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

Native App error when installing from Extension, but work with manual cli install #7

Closed
benyaminl opened this issue Jul 3, 2021 · 11 comments
Labels
bug Something isn't working

Comments

@benyaminl
Copy link

benyaminl commented Jul 3, 2021

Error: Native application tried to send a message of 758581773 bytes, which exceeds the limit of 1048576 bytes.

Any way to debug it? Thanks

I use extension method

@filips123
Copy link
Owner

There is a log file at %APPDATA%\FirefoxPWA\firefoxpwa.log (Windows) or ~/.local/share/firefoxpwa/firefoxpwa.log (Linux).

@filips123 filips123 added the bug Something isn't working label Jul 3, 2021
@benyaminl
Copy link
Author

15:19:37 [WARN] This will download the unmodified Mozilla Firefox and locally modify it
15:19:37 [WARN] Firefox is licensed under the Mozilla Public License 2.0
15:19:37 [WARN] Firefox is a trademark of the Mozilla Foundation in the U.S. and other countries
15:19:37 [WARN] This project is not affiliated with the Mozilla Foundation in any way
15:19:37 [WARN] By using this project you also agree to the Firefox Privacy Notice: https://www.mozilla.org/privacy/firefox/
15:19:37 [WARN] Check the Firefox website for more details: https://www.mozilla.org/firefox/

Seems there're no error here. It's really strange :/
image

@black7375
Copy link

IMO, An error may occur if the other userChorme profile was previously installed.

@benyaminl
Copy link
Author

benyaminl commented Jul 3, 2021

IMO, An error may occur if the other userChorme profile was previously installed.

Nope. I just follow the firefoxpwa runtime install, and it succeed, seems the extension installer need elevation maybe?
Manual install on native folder with administrator account works.

image

PS C:\Program Files\FirefoxPWA> firefoxpwa runtime install
15:24:15 [WARN] This will download the unmodified Mozilla Firefox and locally modify it
15:24:15 [WARN] Firefox is licensed under the Mozilla Public License 2.0
15:24:15 [WARN] Firefox is a trademark of the Mozilla Foundation in the U.S. and other countries
15:24:15 [WARN] This project is not affiliated with the Mozilla Foundation in any way
15:24:15 [WARN] By using this project you also agree to the Firefox Privacy Notice: https://www.mozilla.org/privacy/firefox/
15:24:15 [WARN] Check the Firefox website for more details: https://www.mozilla.org/firefox/
15:24:15 [INFO] Downloading the runtime archive
15:25:11 [INFO] Extracting the runtime archive

7-Zip 19.00 (x64) : Copyright (c) 1999-2018 Igor Pavlov : 2019-02-21

Scanning the drive for archives:
1 file, 55526992 bytes (53 MiB)

Extracting archive: C:\Users\benli\AppData\Local\Temp\.tmp44kIks
--
Path = C:\Users\benli\AppData\Local\Temp\.tmp44kIks
Type = PE
Physical Size = 55526992
CPU = x86
Characteristics = Executable 32-bit NoRelocs NoLineNums NoLocalSyms
Created = 2018-08-31 05:18:33
Headers Size = 4096
Checksum = 55591982
Name = 7zS.sfx.exe
Image Size = 286720
Section Alignment = 4096
File Alignment = 512
Code Size = 69632
Initialized Data Size = 65536
Uninitialized Data Size = 147456
Linker Version = 6.0
OS Version = 4.0
Image Version = 0.0
Subsystem Version = 4.0
Subsystem = Windows GUI
Stack Reserve = 1048576
Stack Commit = 4096
Heap Reserve = 1048576
Heap Commit = 4096
Image Base = 4194304
Comment =
{
FileVersion: 18.5.0.0
FileVersion: 18.05
ProductVersion: 18.5.0.0
ProductVersion: 18.05
CompanyName: Mozilla
FileDescription: Firefox
InternalName: 7zS.sfx
LegalCopyright: Mozilla
OriginalFilename: 7zS.sfx.exe
ProductName: Firefox
}
----
Path = [0]
Size = 55385472
Packed Size = 55385472
Virtual Size = 55385472
Offset = 131584
--
Path = [0]
Type = 7z
Offset = 81
Physical Size = 55385391
Headers Size = 1649
Method = LZMA:25 BCJ2
Solid = +
Blocks = 1

Everything is Ok

Folders: 10
Files: 85
Size:       215121837
Compressed: 55526992
15:25:14 [INFO] Copying the runtime
15:25:15 [INFO] Runtime installed!
PS C:\Program Files\FirefoxPWA>

Seems the profile isn't the same profile with running firefox? It's quite interesting anyway hemm..
Now it's working
image

Just probably the profile need to be the same so doesn't need constant relogin or because I use administrator account this lead to this problem?

@benyaminl benyaminl changed the title Native App error when installing Native App error when installing from Extension, but work with manual cli install Jul 3, 2021
@filips123
Copy link
Owner

Well, that's interesting...

The elevation is only needed to run 7-Zip installer and is requested automatically. If you already had 7-Zip installed, it should install with normal permissions.

I had a similar problem that was caused by 7-Zip that printed something to stdout when extracting Firefox archive, causing the extension to receive broken data. However, this should be fixed, so I'm not sure why this happens...

The profile will be separate from your normal Firefox profile in any case, because FirefoxPWA needs some modifications that need to be in isolated profile. However, this also shouldn't break the installation.

@benyaminl
Copy link
Author

Well, that's interesting...

The elevation is only needed to run 7-Zip installer and is requested automatically. If you already had 7-Zip installed, it should install with normal permissions.

I had a similar problem that was caused by 7-Zip that printed something to stdout when extracting Firefox archive, causing the extension to receive broken data. However, this should be fixed, so I'm not sure why this happens...

The profile will be separate from your normal Firefox profile in any case, because FirefoxPWA needs some modifications that need to be in isolated profile. However, this also shouldn't break the installation.

I observe that the profile, installer, etc is touching program files folder of firefox pwa, I just guessing this is the problem, and with admin user, no error raised. Anyway does the extension itself log debug data? Hmm...

@filips123
Copy link
Owner

The directory where Firefox is installed (C:\Program Files\FirefoxPWA\runtime) is made writable by the main installer.

There are no other log files apart from firefoxpwa.log for the program, but the extension prints errors to the JS console. You can view it by inspecting the extension in about:debugging. However, that error is coming directly from Firefox Native Messaging API, so I don't think there will be anything useful in the JS console.

One other thing you can try is creating an empty DEBUG (with no extension) file in the same dir as the log file, which will set the program log level to info. Then, uninstall the runtime and try to install it again from the extension. Maybe you will get something useful in the log file.

It could be some problem with permissions, but it's interesting that no errors are logged and that it failes because of too long message.

@hoodmonalisa
Copy link

I'm also stuck with this problem.

@filips123
Copy link
Owner

I released 0.3.0 which may fix this issue. I also added better error handling which can help with debugging if the issue is still not fixed.

To debug this issue:

  1. Make sure both the extension and native app are using 0.3.0.
  2. Create an empty DEBUG file in %APPDATA%\FirefoxPWA.
  3. Try to install the runtime from the extension.
  4. Now there should be three log files, firefoxpwa.log, firefoxpwa-stdout.log and firefoxpwa-stderr.log.
  5. Please upload them here.

@benyaminl
Copy link
Author

@filips123 Strangely, this version works as it intended, no error exhaust memory or such
image

firefoxpwa.log
firefoxpwa-stderr.log
firefoxpwa-stdout.log

I also don't see any error on those files, probably there're something wrong with the 0.2.1 version and you accidentally fixed it?

@filips123
Copy link
Owner

Nice to see that is is fixed. Yeah, maybe there was some problem but I fixed it while improving error handling...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants