You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a "wierd" problem we can't reproduce in debug mode but that does appear in release.
We do have on servers' logs an "error 500 : no-header" for a specific WS call when it is called on BG/FG.
ONLY the authorization header is concerned, the "app-version" is ALWAYS here !
This very call is well done when happening just after the user's login.
This very call is "always" well done when in debug mode ! (i tried but can't reproduce it on emulator AND physical device when launched from AndroidStudio)
I'm convinced (look at the interceptor's code below) that the only thing that can happen is that the userDao used to retrieve the token isn't correctly provided at the time it is used by the request interceptor and therefore passes into the following code from interceptor : print(">> Authorization token NULL ! <<");
Is there a way to WAIT for the provided resource in our dart code ? (we use the "late" word when declaring the UserDao)
So that we'd be sure that the interceptor really got the userDao in order to retrieve the user and it's token ?
'Cause the userDao should never be null since it is initialized in the main.dart as this :
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
We have a "wierd" problem we can't reproduce in debug mode but that does appear in release.
I'm convinced (look at the interceptor's code below) that the only thing that can happen is that the userDao used to retrieve the token isn't correctly provided at the time it is used by the request interceptor and therefore passes into the following code from interceptor :
print(">> Authorization token NULL ! <<");
Additionnal infos :
We use :
Here is the relevant code used :
Request Interceptor (Dio) :
triggered into the homepage.dart like following :
Is there a way to WAIT for the provided resource in our dart code ? (we use the "late" word when declaring the UserDao)
So that we'd be sure that the interceptor really got the userDao in order to retrieve the user and it's token ?
'Cause the userDao should never be null since it is initialized in the main.dart as this :
and that the code is only triggered if the user is logged...
Thanks in advance for your help !
We're quite disappointed to be honnest.
Beta Was this translation helpful? Give feedback.
All reactions