IndigoWizard / NDVI-Viewer

Monitor Vegetation Health by Viewing & Comparing NDVI Values & Satellite Images On The Fly!
https://ndvi-viewer.streamlit.app/
16 stars 6 forks source link

Earth Engin Authentication issue with geemap in streamlit when deployed to Streamlit Cloud #32

Closed IndigoWizard closed 7 months ago

IndigoWizard commented 7 months ago

When deploying the Streamlit app that integrates with Google Earth Engine (GEE) on Streamlit Cloud, there is an authentication issue. The app gets stuck in an indefinite authentication loop when using the geemap.ee_initialize() method. The issue is observed when attempting to authenticate GEE using a normal account with an Earth Engine Token stored in Streamlit Secrets.

Steps to Reproduce

  1. Authenticate Earth Engine locally in a terminal: earthengine authenticate
  2. Copy the Earth Engine token from "C:\Users\USER\.config\earthengine\credentials" to Streamlit secrets.
  3. Use geemap.ee_initialize() method to authenticate and initialize GEE in streamlit.
  4. Deploy a Streamlit app on Streamlit Cloud.
  5. Observe the app getting stuck in the authentication process.

Expected Behavior

The Streamlit app should successfully authenticate and initialize GEE using the provided GEE Token and run without getting stuck in the authentication process.

Actual Behaviour

https://github.com/IndigoWizard/NDVI-Viewer/assets/43890965/cb93f330-53fd-4114-baf1-aa9628a7c601

Additional Information