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

electron33 : protocol.registerFileProtocol is deprecated !?! #2672

Closed
panaC opened this issue Nov 20, 2024 · 2 comments
Closed

electron33 : protocol.registerFileProtocol is deprecated !?! #2672

panaC opened this issue Nov 20, 2024 · 2 comments

Comments

@panaC
Copy link
Member Author

panaC commented Nov 20, 2024

protocol.registerFileProtocol("store",

https://github.com/edrlab/thorium-reader/blob/57a79dda7bc83fbbfdae5b1b3e33887212eb3a40/src/main/redux/sagas/app.ts#L163C14-L163C34

protocol.registerFileProtocol("pdfjs-extract", async (request, callback) => {

@danielweck
Copy link
Member

npm run package:mac:skip-notarize
==>
npx @electron/fuses read --app ./release/mac-arm64/Thorium.app

Analyzing app: Thorium.app
Fuse Version: v1
  RunAsNode is Disabled
  EnableCookieEncryption is Disabled
  EnableNodeOptionsEnvironmentVariable is Disabled
  EnableNodeCliInspectArguments is Disabled
  EnableEmbeddedAsarIntegrityValidation is Disabled
  OnlyLoadAppFromAsar is Disabled
  LoadBrowserProcessSpecificV8Snapshot is Disabled
  GrantFileProtocolExtraPrivileges is Enabled

await flipFuses(electronBinaryPath, {
version: FuseVersion.V1,
// https://github.com/electron/fuses?tab=readme-ov-file#apple-silicon
resetAdHocDarwinSignature: context.electronPlatformName === "darwin" && context.arch === builder.Arch.arm64,
// RunAsNode = 0,
[FuseV1Options.RunAsNode]: false, // ELECTRON_RUN_AS_NODE
// EnableCookieEncryption = 1,
[FuseV1Options.EnableCookieEncryption]: false, // TODO: make this TRUE
// EnableNodeOptionsEnvironmentVariable = 2,
[FuseV1Options.EnableNodeOptionsEnvironmentVariable]: false, // NODE_OPTIONS + NODE_EXTRA_CA_CERTS
// EnableNodeCliInspectArguments = 3,
[FuseV1Options.EnableNodeCliInspectArguments]: false, // --inspect
// EnableEmbeddedAsarIntegrityValidation = 4,
// https://github.com/electron/fuses/issues/7
// https://github.com/electron-userland/electron-builder/pull/8245
// https://github.com/electron-userland/electron-builder/issues/6930
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: false,
// OnlyLoadAppFromAsar = 5,
[FuseV1Options.OnlyLoadAppFromAsar]: false,
// LoadBrowserProcessSpecificV8Snapshot = 6,
[FuseV1Options.LoadBrowserProcessSpecificV8Snapshot]: false,
// GrantFileProtocolExtraPrivileges = 7,
[FuseV1Options.GrantFileProtocolExtraPrivileges]: true, // TODO: make this FALSE! (file://)
});

===> [FuseV1Options.GrantFileProtocolExtraPrivileges]: true

TODO: make this FALSE! (file://)

danielweck added a commit that referenced this issue Dec 31, 2024
…e continues to work (tested in prod with PDF and EPUB BrowserWindow/WebView preloads) Follow-up to #2672
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants