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

ToDo: Document how to get Firefox to run from source #1512

Open
gamebeaker opened this issue Sep 26, 2024 · 2 comments
Open

ToDo: Document how to get Firefox to run from source #1512

gamebeaker opened this issue Sep 26, 2024 · 2 comments

Comments

@gamebeaker
Copy link
Collaborator

gamebeaker commented Sep 26, 2024

Problem in firefox desktop and firefox android

Firefox.js -> injectContentScript() -> chrome.tabs.executeScript
fails with:
image
It only happens if WebToEpub is loaded from the unzipped file (open manifest.json instead of xpi)
The main problem is in firefox android as i can only debug the unzipped version and not the xpi version. As result of that the dom is unavailable to debug.

The xpi version which is downloaded from the store works as intended.

@dteviot
Copy link
Owner

dteviot commented Sep 26, 2024

@gamebeaker
IIRC, you can't use the source directly in Firefox. Need to build the xpi and then unzip.
To start with, Firefox is using manifest v2, chrome is v3. So, build script will re-write manifest.json
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/executeScript

I need to update the documentation.

@gamebeaker
Copy link
Collaborator Author

@dteviot thanks it works for desktop and android.

@dteviot dteviot reopened this Sep 26, 2024
@dteviot dteviot changed the title Firefox debug problem ToDo: Document how to get Firefox to run from source Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants