Post

2 followers Follow
0
Avatar

Items gone after API call and memory leak?

We have a relations app, but as soon as our API updates this app, I cannot see the app as my own user. It says: showing 0 from 86 ,while no filters are active. Other users on our domain can see it.

Even if I do a small request this happens.

Also, when I keep trying, my computer drags, looking at the chrome task manager I see podio using 1.8Gb of memory, which is quite much I guess!

Kind regards,

Riel

Attachment(s)

Screenshot 2013-05-16 at 20.54.56.png

5195223ec6ba5d6177000003.jpeg

Riël Notermans Answered

Please sign in to leave a comment.

12 comments

0
Avatar

Cool, that makes sense. But changing the filter in the UI isn't working. It is like the filter is hardcoded now, which is quite troublesome. Is this how it should work?

Riël Notermans 0 votes
0
Avatar

You can set another filter with the API (with remember:true) to kick the app out of the current state. Without knowing what filters you set it's hard to tell why the web is acting up. My gut feeling is that you set some sort of filter the web frontend doesn't handle?

Andreas Haugstrup Pedersen 0 votes
0
Avatar

This was my filter (without the 'remember' parameter).

Is the memory leak explainable? It seemed it only happend when I used this filter and tried to fix the UI. My browser would crash eventually.

Code is a string in this format:

var code = "5f3a80c0-de47-488c-8de8-18b84fc82357";

key is a text-field (single line).

 

var filter = {

"filters": [

{

"values" : code,

"key": "33252334"

}

],

"remember" : false

}

Callserver 0 votes
0
Avatar

Ah! Text fields are not filterable in the UI!

That would be the issue here I guess!

Callserver 0 votes
0
Avatar

Text fields cannot be used for filtering, period. I'm guessing the web frontend got into an infinite loop. We will take care of that issue. :)

Anyway, you can't filter on text fields. Either use a category field (if you can) or use the search interface: https://developers.podio.com/doc/search

/Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

Ai, that is painfull. It ís working now, and a big part of our work is depending on that. It should throw an error but it just gives the right result. Let me know if you are going to remove this from the API, because I need to change a lot of code then :( 

I am trying the seach mode for now,  but it gets me:

"The user with id 1009xx7 does not have the right view on app with id 4293xx7"

Callserver 0 votes
0
Avatar

It will be removed. It's a mistake it never threw an error in the first place (it usually does). We have never supported filtering on text fields and it's unlikely we will. You should use the search API for those kinds of searches. It's quite powerful.

As for your error message: It's what it says. The user/app you are authenticated as does not have access to the app you are trying to search.

/Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

Hmm, the I am confused, because it is the exact same user/script I am using podio with and creating items in the same app. 

Callserver 0 votes
0
Avatar

Strange, I just attempted to search an app using app auth and it worked without problems. Can you make sure you have fresh access tokens and try again?

/Andreas

Andreas Haugstrup Pedersen 0 votes
0
Avatar

I am not using app-auth but client-auth.

Our tokens refesh automatically when I get a 401 and redo the call. My logger gives this:

403| Call: search/app/4293477/  | Error message:The user with id 1009797 does not have the right view on app with id 4293477

If I change the call to a filter it does work, so it would not be an auth problem I guess?

 

Is app-auth needed to search an app? 

Callserver 0 votes
0
Avatar

Hi Riel,

Sorry for the delayed response, I've been on holiday. No, app auth is not required. I just made a little test script and could search just fine when authenticating as a user. Are you still having trouble?

And the mandatory dumb question: The user is a member of the workspace where the app resides?

/Andreas

Andreas Haugstrup Pedersen 0 votes