Seeing TypeError: Failed to fetch dynamically imported module

I haven’t used my app in a while so it went to sleep and needed a wake up. After it woke up, I saw the error:

TypeError: Failed to fetch dynamically imported module: 
https://xxxx.streamlit.app/~/+/static/js/index.DzWF7M_0.js

I did not update code since my last visit so I expect it to continue working without any issue. It’s a simple app without any fancy bells and whistles. And it is private data so I can’t share the URL.
The app does work eventually after I hit “Reboot” a few times. But it also keeps failing unpredictably with a similar error. Is there some kind of cache that I need to clear? If so, where is it and how can I clear it?

May we see the contents of your requirements.txt

Hi, I have been seeing the same error on a few different apps over the last week or so. It takes several refreshes for the error to go away. It also takes quite a long time for the app to start up, and that usually requires at least one refresh as well. These apps were booting up fine about 2 weeks ago and the code hasn’t changed.

Here are the contents of requirements.txt files for 2 of the apps:
App1:
google-generativeai
streamlit
Pillow
pytesseract

App2:
streamlit
pandas
deepgram-sdk
requests
openai
plotly
plotly-express
matplotlib
seaborn
networkx
pyvis
datetime
pypandoc
python-docx
numpy

Thanks for any help with this.

My requirements.txt file has the following three items:

biopython
pandas
streamlit

I am having the same problem, and also require pandas

I am also seeing this issue lately. My requirements:

streamlit 
watchdog 
streamlit-extras
plotly 
scipy
# 23-12-12 until at least 24-10-04: StreamlitAPIException: Streamlit only supports Bokeh version 2.4.3, but you have version 3.3.2 installed.
bokeh==2.4.3

I’m seeing the same error. Fairly regularly, in production we see the following error rendered instead of several streamlit components:

TypeError: Failed to fetch dynamically imported module: https:///static/js/index.B2Xocyf.js

The value after static/js/index. varies, we’ve also seen CbuYSrVP.js.

Unfortunately, we have not been able to reproduce the problem. Is this possibly an issue with either deploying a new version of our app, or specifically deploying a new version of our app with an updated version of streamlit?

I have created a Github issue but it was closed.