Codesandbox-client: Firefox problems

Created on 28 Nov 2018  路  7Comments  路  Source: codesandbox/codesandbox-client

馃悰 bug report

Description of the problem

I just discovered CSB and noticed several problems when I started using it with my default browser, Firefox. First I noticed that the preview is not updated on edits although the corresponding option is enabled. In chromium-based browsers it works.

The next problem can be seen in the sandbox linked below. The HTML contains several event handler registrations pointing to functions in the javascript file of the project. On Firefox, these handlers are not evaluated so that the resulting preview doesn't function as intended, not even after a manual reload. On a chromium browser or when downloaded the code works as expected.

Link to sandbox: link (optional)

Your Environment

| Software | Name/Version|
| ---------------- | ---------- |
| 小odesandbox | PROD-1543089170-3966f59|
| Browser | Firefox 63.0.3/64.0b13|
| Operating System | Windows 10|

馃帓 Bundler 馃悰 Bug

All 7 comments

This one is tricky. I found out that Firefox handles document.write differently than Chrome, because of this the Parcel template might act finicky.

I will need to rewrite how Parcel templates are handled. It might be needed to use a service worker instead of document.write.

I also noticed console.log doesn't work (no errors, no log on the console) if using Firefox and Parcel as the bundler.

just adding a bit more info here:

I can't even see the preview on some pages.

Example:
http://adazzle.github.io/react-data-grid/docs/examples/simple-grid
https://reach.tech/router/example/basic

Firefox Version: 65.0

On Chrome it behaves as expected.

We've been trying to reproduce the problem with no success yet. We're thinking that it might be related to some enabled extensions.

Could you test whether it works in a private window? Also, could you send a screenshot of the browser and of the console?

Thanks for taking the time to help us with this issue! We'll hopefully fix it soon.

Good point with the extensions! Didn't thought of that...
The culprit for me was the extension "Privacy Badger". It blocked the domain by default, so I had to enable it manually for CSB.

Interesting... I will send a message to the extension authors.

I wasn't able to fix the issue with Privacy Badger. Privacy Badger marked the iframes as unsafe, because the user code in the sandbox was saving cookies. I don't think we're able to prevent users from writing cookies without also breaking code.

The other issue, with Firefox and vanilla template will be (finally!) fixed with this PR: #1697. 馃帀

Was this page helpful?
0 / 5 - 0 ratings