-
-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Earth Engine initialization error: authentication token not getting detected from Streamlit app's Secrets #41
Comments
Were you able to test the app locally? |
I have not tried that, I went straight from forking to publishing on Streamlit. I'm new to this, I didn't think that step was necessary. Will now try that step and report back. |
If you did not it try it locally, how did you get the Earth Engine token? Make sure the app works fine locally before deploying it to the cloud. |
I tried it locally, and it worked (screenshot of the local URL on a browser tab below). [I think I got the app to work on the cloud—by using the token stored on my local machine instead of the one generated by following the link the build log on Streamlit takes me to. But, strangely, "client not initialized" error in the build log persists. More details below.] Before trying it locally, I got the Earth Engine token by following the authorization link that came up in the "Manage app" build log for the app in my Streamlit. This is in the log I pasted in my message above, see screenshot below where I have highlighted it. It did not give me the box to paste the token into, like it said it would. I went ahead and saved the token into the app's "Secrets". I thought it'll get picked up on rebooting the app, but that never happened, I get shown a (new) authorization link each time in the build log and I get the same errors. On seeing that the app runs fine locally, I also took the token in my local machine (in my But, strangely, the build log in "Manage app" on Streamlit hasn't stopped saying "Earth Engine client library not initialized. Run With the app now started to work, perhaps I can ignore this message and move on—or would that be inadvisible, any suggestions? The last few lines of the log copied over, are as follows:
|
Yes, you need to use the token from Also, use As long as the web app is working properly, you can ignore the warning message. |
After a gap of ~18 months, I sync'd with the source repo's master branch to pick up updates/changes. I am now seeing a I have checked that the app runs locally as well as when I run it in a GitHub Codespace (I have added my Links:
Screenchots to show app is running fine for me locally and on Codespaces: |
The authentication method has never changed. |
If possible, it would be very helpful if could you suggest where I could look for why my app is not working on the cloud (Streamlit) alone. I'm unable to tell, and I'm not very proficient at this. The most recent logs on "Manage App" on Streamlit is as follows. It is essentially the same as what appears in the map panel in the cloud app.
Thank you! |
First off, thank you so much for this excellent free and open resource! Your efforts here are much appreciated! I am currently looking to build a simple Earth Engine app and am using this repo to learn how to do so.
The issue
I am getting a "Earth Engine client library not initialized. Run
ee.Initialize()
" error on my web app.Although I have generated and saved the Earth Engine authentication token in the app's "Secrets", as you have described in your blog post, the app seems to not pick it up from there.
How do I fix this?
What I have done
I began with trying to replicate this multi-app (https://streamlit.geemap.org/) on my Streamlit account, so I forked this repo and published it as-is on my Streamlit.
Error as seen on the web app
But when I select an app working with Earth Engine (eg. Google Earth Engine (GEE), Awesome GEE Community Datasets), I get the following error.
Error as seen in "Manage App" log, from inside my Streamlit account
The most recent log in "Manage App" ends with the following—I'm guessing the app is not finding the authentication token eventhough I have generated and save it in the app's "Secrets".
(I have purposely truncated the authentication web link below.)
The text was updated successfully, but these errors were encountered: