Skip to content
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

Continued "unknown error" script save failures #2943

Closed
arantius opened this issue Apr 18, 2018 · 7 comments
Closed

Continued "unknown error" script save failures #2943

arantius opened this issue Apr 18, 2018 · 7 comments
Milestone

Comments

@arantius
Copy link
Collaborator

@arantius arantius commented Apr 18, 2018

See #2909 . I've repeatedly tried to narrow down a reproduction case, but I can't. All I know for sure is:

  • I've got this script https://arantius.com/misc/greasemonkey/ebay-butler.user.js
  • It includes @resources.
  • When I load a page where it injects those resources (CSS), the page often never finishes loading (tab icon continues throbbing forever, unless I press ESC).
  • If I try to disable/enable this script, sometimes I get the same style of failure as in #2909.

So I think we need to update resources to be stored as buffers instead of raw blobs, just like we did for icons.

@arantius arantius added this to the 4.4 milestone Apr 18, 2018
@Sxderp
Copy link
Contributor

@Sxderp Sxderp commented Apr 18, 2018

We really shouldn't need to. The underlining cause is likely some Firefox bug that needs to be brought up. Unfortunately, back when I made the icon patch I tried making a minimal extension to reproduce. But couldn't seem get a reproduction. Maybe a debugging build of Firefox could help. Though I don't even know where I'd find a pre-compiled one, or where to even begin with compiling (and then somehow interpreting results).

@arantius
Copy link
Collaborator Author

@arantius arantius commented Apr 18, 2018

I also struggled to reproduce this. I see it regularly on my main profile, but I don't know what exactly triggers it.

@Sxderp
Copy link
Contributor

@Sxderp Sxderp commented May 15, 2018

Might be worth adding another check (or two). After sending the blob to the content-script (and it receives it) make the content-script send another trigger message. In the handler for this message do two things. Firstly, check if the blob is still valid (Fileread, etc). This is to check if the process to 'send' the blob also corrupts the background reference. Secondly, try to resave the blob or object it's attached to with minor modifications (to simulate 'ToggleScript'). See if the 'UnknownError' occurs.

@arantius
Copy link
Collaborator Author

@arantius arantius commented May 18, 2018

This is to check if the process to 'send' the blob also corrupts the background reference.

In the "broken-blob" codebase attached at the above bugzilla issue, I added a readBlob() in the BG side, same message handler. As I load each page, it always successfully reads its own blob and logs its contents.

Secondly, try to resave the blob or object it's attached to with minor modifications

Interesting idea, feel free to give it a shot. But see my update to that bugzilla issue today, only re-launching Firefox with no additional save seems to break it?

@arantius arantius closed this in 571349a May 18, 2018
@Sxderp
Copy link
Contributor

@Sxderp Sxderp commented May 18, 2018

I think the close was an autoclose. I'd reopen it for tracking the bug. I performed a mozregression on the issue, using the provided .xpi. Turns out they did some Blob changes back in May 2017.

@arantius
Copy link
Collaborator Author

@arantius arantius commented May 18, 2018

Issues are useful for more than one thing. This is tagged in the 4.4 release, and will go out there. We've "only" got a work around in place, but that's what we can do. Tracking a separate issue (clean up the workaround, if/when the underlying issue is fixed) would be fine, but won't be part of the 4.4 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.