Hey guys,
I’m having an issue with testing my native app on Android. The app loads the login screen ok, but when I try to login or register I get the message “Sorry, your login session has changed / expired… please try again,” which is the Bubble system message for “when the session of the current user has expired.”
I’ve tried on emulators, I’ve published an Alpha version to the Google Play Store, same result. I’ve also published to the Apple Store and the login works fine on my iPhone.
After a lot of research I’ve seen a lot of threads talking about Android blocking cookies for apps that use them to store the user session, could this be the same problem with Bubble? Has anyone got any advice for resolving this issue?
It looks like no one’s familiar with this issue. Should I send a message to support @emmanuel?
We don’t support android yet.
Dang. Do you think a self sourced solution might work? (I saw some on the ionic forums for example, they’re just difficult to implement) Or is it a fundamental problem with Bubble’s functionality for the moment?
What did you use to build your Android version? My login works fine on my Android app.
Hi Nate! Thanks for replying. I used the same Phonegap build as the working iOS version. I tried with and without a key when creating the apk, though the key I made was one I created myself without android studio or sdk, not sure if that makes a difference…
Yeah, it won’t work with PGB, because I believe that the .zip file isn’t configured to work with Android. To do it yourself, you’d either have to build the entire thing in Android Studio or pay $500+ to a service like https://gonative.io/.
I can also build an Android file for much cheaper than gonative. Reach out to me if you’re interested.
Thanks for the info and the offer Nate! I’m going to try the Android Studio route first but I’ll keep your offer in mind.
1 Like
Hey Nate. I followed your advice and built the app with Cordova and Android Studio. I’m still getting the “session expired” error. It’s got to be something to do with the storage of cookies, but I’ve emulated on older Android versions and got the same result (before cookies became blocked, so I understand). I see this repeating error in the android studio debugger a lot:
“Reauthed to firebase but cookie did not contain a valid token: {“cookie_name”:“activateenglish-firebase_workflow”,“token”:null,“cookieEnabled”:true,“dck”:”"}", source: https://dhtiece9044ep.cloudfront.net/package/run_js/d8d698b076995684042595c97470a84268221967415353908541fea114834f7c/ (49)
06-28 14:55:36.852 10833-10833/com.activateenglish.app I/chromium: [INFO:CONSOLE(49)] “USING FAKE_TEMP_UID (legit if we just changed temp_db)”, source: https://dhtiece9044ep.cloudfront.net/package/run_js/d8d698b076995684042595c97470a84268221967415353908541fea114834f7c/ (49)
Any ideas? Thanks, Richard.
P.S. I know you said before that your login works on android. It’d really help if you could please send your index.html and index.js files so I can compare.
P.P.S. - The above error is a quote coming from the Bubble system. Any ideas @emmanuel ? (I know Android isn’t supported, but if I just know what the error means I can advance a little)
That means for some reasons the cookie isn’t being saved properly. Not sure that helps though…
It really does @emmanuel, thanks. It seems storing a session cookie is the only thing stopping the login process, otherwise everything works fine. I’m banging my head against the wall trying to implement javacode in the Cordova build to “setacceptcookies”, but every time I add something into the Android Main Activity it crashes… (I know it’s not supported, just saying it to pique your curiosity).
@natedogg, how did you solve the cookie session problem in your app?
I also see Firebase referenced in the Bubble js that’s trying to generate the cookie, can I use Firebase to handle sessions in my app instead of local cookies?
No, this is very core to Bubble, so you can’t really hack stuff there.
Ok thanks Emmanuel. Could you explain what the Bubble script does regarding cookies during the login process?
This is getting a little bit too detailed for something we don’t support yet. Can’t you try what @natedogg has done? Works for him.
Waiting to hear from him on his solution. It looks like your code is indeed throwing that error I posted because it detects that cookies aren’t enabled. Just need to hear from someone who has worked out how to enable cookies in the Cordova build.
@richardosborne14
I’ve haven’t had to deal with a cookie issue on Android with the methods that I use.
Are you trying to import your Cordova build into Android studio? You can build a webview app in Android Studio without doing that.
I have another client who tried building a Bubble Android app with Cordova and ran into the same issue. I advised them to either use Android Studio or go with a paid option if they’d rather not learn how to build a webview app.