codesandbox-client
codesandbox-client copied to clipboard
Chrome Errors in project preview "TypeError Could not fetch dependencies, please try again in a couple seconds"
🐛 bug report
Edit: updated link to reflect new location:
Preflight Checklist
- [x] I have read the Contributing Guidelines for this project.
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.
Description of the problem
Under Chrome, the sandbox located here produces an error in the embedded browser:
https://codesandbox.io/s/github/akutruff/diagon/tree/master/apps/demo
Firefox works fine.
TypeError
Could not fetch dependencies, please try again in a couple seconds: Cannot read properties of null (reading 'match')
s
https://codesandbox.io/static/js/sandbox.11a2ae9a6.js:1:138474
(anonymous function)
https://codesandbox.io/static/js/sandbox.11a2ae9a6.js:1:170761
i
https://codesandbox.io/static/js/sandbox.11a2ae9a6.js:1:167040
How has this issue affected you? What are you trying to accomplish?
Project broken in chrome.
To Reproduce
Go to sandbox here: https://codesandbox.io/s/github/akutruff/diagon/tree/master/apps/demo and try to see the app. If you copy the embedded preview url into a new browser tab, the error will also occur. If you "empty cache and hard reload" on the tab with the preview url, it will actually work once. If you refresh that page again, the error occurs again. "empty cache and hard reload" on the full sandbox does not fix the problem.
Link to sandbox: link (optional)
Your Environment
Software | Name/Version |
---|---|
Сodesandbox | latest |
Browser | Chrome |
Operating System | Windows |
Hey! I cannot seem to repro this issue, are you still experiencing this?
I've seen before that an adblocker could prevent some dependencies from being downloaded. Could that maybe be it?
Yeah, unfortunately. It's super weird. Perhaps try refreshing the page a lot, or opening it other browsers? It worked fine until I I set new NPM versions for the dependencies.
I can confirm the exact same issue, but in my case it takes a long time to install the dependencies, sometimes it will throw the same error and sometimes it will render the app but that is when it takes a long time to install them.
And after it install babel it will throw this error
No matter which version of NPM I choose, it takes a long time to compile a project.
Ubuntu 22.04 Tried on all my browsers edge, chrome, firefox and the issue is the same.
Hey @wilsoft-gt - I've just opened the URL in your screenshot and it's loading perfectly.
Out of interest, do you have a device with a different operating system that you could try it on?
@JamesACS I disabled all ad blocking and its still happening for me.
Now, I'm getting CORS errors when referencing my packages as well.
It's still loading fine for us @akutruff , are you using incognito mode?
As above, have you also tried to load it using a browser on a different operating system?
Hey @wilsoft-gt - I've just opened the URL in your screenshot and it's loading perfectly.
Out of interest, do you have a device with a different operating system that you could try it on?
Yes, it is working fine in other OS, it seems that the issue is somewhere in ubuntu but can't find anything related to this anywhere. I check the network and restarted the page and this is what I'm getting, not sure if this is related to the container and ubuntu 22.04 or what. Half a minute trying to fetch babel core and babel runtime and other dependencies are marked as red as well.
@JamesACS
Nope, normal mode. It will work in incognito mode sometimes.
@JamesACS updated link to sandbox
Also, here's it running on stackblitz without error: https://stackblitz.com/github/akutruff/diagon/tree/master/apps/demo
Hi, I have a similar issue and I am using a mac. Link to the code sandbox is here [https://codesandbox.io/s/8te0rv?module=/example.js&file=/package.json]
I updated the package version to Newskit 6.3.0 as shown in the sandbox, originally the version was 'unstable' it worked fine with 'unstable' as soon as I changed the version I got the same error of not being able to fetch. I tried it incognito and on safari (I am currently using chrome) and it does not work. I was wondering if anyone has any advice?
I'm experiencing the same issue (Intel Mac + Chrome-based browsers; Firefox is fine) and I see from previous discussions that this has been a persistent problem for at least a year. @baburay23 and @akutruff , were either of you able to discover a workaround or potential solution?
EDIT: In my case it sometimes works if I don't set expanddevtools=1
(which I need). When I set expanddevtools=1
, then it never works.
EDIT2: I also observerd it works on incognito, but it does not work on the normal Site even if I remove all cookies and local storage...
Ok, I managed to make it work. In my case I was trying to embed a github project. I read from other users that adding a tag could fix it. And, it worked... I have the feeling that creating a new tag solves some kind of wrongly cached issue.