Error running meteor in MAC - macos

I am trying to run meteor app on MAC without success with following error. Surprisingly other project is running properly in MAC and very this project runs properly on Windows. But in MAC I can't figure out what's wrong.
/Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:245
throw(ex);
^
Error: Must throw non-empty error
at Object.Future.throw (/Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:259:10)
at /Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/buildmessage.js:541:23
at runWithEnvironment (/Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fiber-helpers.js:139:21)
at /Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/fiber-helpers.js:146:14
at /Users/user1/.meteor/packages/meteor-tool/.1.1.4.xh5uo++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/tools/buildmessage.js:549:11

The issue is probably related problems fetching the packages, see https://github.com/meteor/meteor/issues/4921

Related

How to log the error of an electron windows application : "A javacript error occured in the main process"

I created an electron app. I get this error.
I know that it is due to a native lib not being built against the correct platform. My problem is that the name of the lib doesn't appear in the error message. I tried to run the app in the cmd, but there is no log there. I tried event viewer and I tried to install Process Monitor to detect the errors, but I didn't succeed to find the error log, and I end up with no idea about how to find the complete error message.
I even tried "C:/path/to/my/app.exe" > log.txt 2> errorlog.txt but the 2 files were empty...
Can anyone help me?
Ok. I discovered how to debug a program on Windows... Don't use Windows. I switched to Ubuntu, installed wine, ran the faulty project, and directly got the complete error message. Turns out that the culprit was ref-napi. I solved the original issue this way

React Native App throwing domain=FBSOpenApplicationServiceErrorDomain, code=3 Error

I've updated quite a few NPM packages in my React Native app and now even though it seems to build fine, it starts and immediately crashes on the iOS simulator. The error that it throws is:
Failed to launch the app on simulator, An error was encountered
processing the command (domain=FBSOpenApplicationServiceErrorDomain,
code=3) The request to open "org.reactjs.native.example.myappname"
failed. THe process did launch, but has since exited or crashed.
Prior to these npm package updates, the app was running fine. I found a few suggestions such as running rm -rf ios/build, cleaning the project, etc. I tried all these but still getting the same error.
Any suggestions on how to fix this issue?
BTW, this is a react-native: "^0.65.1" app and the Xcode version is 12.4.
If there is no recent change in the iOS project files then try:
Reset Content and Settings of the simulator:
If reseting the simulator content and settings doesn't work, update Xcode to its latest version.
I encountered this while upgrading a React Native application and found the actual error a few lines above:
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22): Failed to install the requested application The application's Info.plist does not contain a valid CFBundleShortVersionString. Ensure your bundle contains a valid CFBundleShortVersionString.
Then a few lines later error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=4):
Fixing the above error by setting the version correctly in xcode fixed the error for me.
The error was thrown in my case because of the bundle id was copy pasted to xCode and it had space around:
" com.your.app "
instead of
"com.your.app"
In my case the problem was for xml formatter and when I formatted the file it was added " " before package name.
check the source after formatting the file.

"GPU process isn't usable. Goodbye."

I'm experimenting with building a Windows and Mac OS app using Electron and have hit a snag.
In short, if I try to run the application directly with Electron on Mac OS Big Sur (as opposed to building a Mac app and then running that) I get the following error returned:
[35941:0821/171720.038162:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.
I am running directly with Electron using the following in my package.json:
"scripts": {
...
"test": "electron main.js",
...
}
So far the only Mac OS environment I have access to is Big Sur so haven't tried this on earlier versions of Mac OS but from Googling it seems this error may be related to Big Sur's tightened security/sandbox constraints -- but I am guessing about that.
In any case, after some Googling several suggestions indicated trying to run without the app sandbox, i.e. adding this to main.js:
app.commandLine.appendSwitch('no-sandbox');
That's all well and good and works.
However, if I ever want to build and distribute a signed Mac app targeting the Mac App store or a just a signed, sandboxed DMG or PKG installer, then this won't be suitable.
If I remove the above no-sandbox command from main.js and specify the app sandbox in my entitlements plist as shown below the resulting signed app will not run:
<key>com.apple.security.app-sandbox</key>
<true/>
The app tries to open and just closes. I can try running at the command line with open <appname>.app but this throws the following error in the console:
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10826 "kLSNoLaunchPermissionErr: User doesn't have permission to launch the app (managed networks)" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2561, NSUnderlyingError=0x7fd3c9c13db0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7fd3c9c158e0 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}}}}
If I build a signed app with no-sandbox enabled, the app will run just fine on Big Sur using open <appname>.app.
I have tried my best through Google, Stack Overflow, etc to diagnose this but am not getting anywhere. Here's to hoping the Stack Overflow community can provide me the critical clue to solving this.
For further context, I created a new, empty Electron application and followed the Electron Quick Start Guide to the section where it describes creating an empty main.js which technically should allow the Electron app to start -- but it won't. The same error describe above re the GPU gets thrown even without instantiating a BrowserWindow or writing any custom code of my own.
NEW UPDATE: I set these environment variables to true and then tried running the app with npm start:
ELECTRON_ENABLE_LOGGING
ELECTRON_DEBUG_NOTIFICATIONS
ELECTRON_ENABLE_STACK_DUMPING
The result is more detailed error output:
[48836:0823/165857.676747:ERROR:icu_util.cc(179)] icudtl.dat not found in bundle
[48836:0823/165857.676838:ERROR:icu_util.cc(243)] Invalid file descriptor to ICU data received.
[48778:0823/165857.677376:ERROR:gpu_process_host.cc(1003)] GPU process exited unexpectedly: exit_code=5
[48778:0823/165857.677430:WARNING:gpu_process_host.cc(1317)] The GPU process has crashed 1 time(s)
[48850:0823/165857.827224:ERROR:icu_util.cc(179)] icudtl.dat not found in bundle
[48848:0823/165857.827255:ERROR:icu_util.cc(179)] icudtl.dat not found in bundle
[48850:0823/165857.827341:ERROR:icu_util.cc(243)] Invalid file descriptor to ICU data received.
[48848:0823/165857.827358:ERROR:icu_util.cc(243)] Invalid file descriptor to ICU data received.
[48778:0823/165857.827836:ERROR:gpu_process_host.cc(1003)] GPU process exited unexpectedly: exit_code=5
[48778:0823/165857.827875:WARNING:gpu_process_host.cc(1317)] The GPU process has crashed 2 time(s)
... repeats until the GPU processes crashes 9 times ...
[48778:0823/165903.080134:FATAL:gpu_data_manager_impl_private.cc(415)] GPU process isn't usable. Goodbye.
Haven't had time to do the research as to what ICU refers to but thought I would update with this info.
ANOTHER UPDATE: all this has been done on Mac OS Big Sur which is my main development machine. Trying this on a Windows 10 machine, using the same Electron code, dependencies, etc and things work fine. So the problem is either related to Mac OS Big Sur or a specific local issue on my development machine which I cannot identify. Any suggestions on how to diagnose this will be much appreciated.
ONE MORE UPDATE: Based on a guess, I created a new user on my mac, took the code in there and it ran perfectly. So -- this probably means that I need to find something installed in my profile or some corruption in my own profile/settings that is breaking things. As always, any suggestions appreciated it.
In my case, I got this to work using command line switch, --in-process-gpu, or:
app.commandLine.appendSwitch('in-process-gpu');
There's also an extensive list of Chromium switches here that you can try at:
https://peter.sh/experiments/chromium-command-line-switches/
Yeah, the whole hardened runtime thing is just such an awful, awful mess! Now to figure out the next crash!
So -- partial answer. I think I've found the solution to this error:
GPU process isn't usable. Goodbye.
My development directories are all on a file system accessed via a symbolic link. As soon as I moved the folder for this app to my my home directory (no symlinks involved) I could launch with npm start without needing to enable no-sandbox and without seeing this error or the errors related to icudtl.dat.
I haven't yet determined if the problem described with the error below when launching the packaged app is related/solved:
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10826 "kLSNoLaunchPermissionErr: User doesn't have permission to launch the app (managed networks)" UserInfo={_LSFunction=_LSLaunchWithRunningboard, _LSLine=2561, NSUnderlyingError=0x7fd3c9c13db0 {Error Domain=RBSRequestErrorDomain Code=5 "Launch failed." UserInfo={NSLocalizedFailureReason=Launch failed., NSUnderlyingError=0x7fd3c9c158e0 {Error Domain=NSPOSIXErrorDomain Code=153 "Unknown error: 153" UserInfo={NSLocalizedDescription=Launchd job spawn failed with error: 153}}}}}
That said, it is a big step forward.
I have a similar issue on a linux machine with an electron app. The answer in this github issue helped me.
Using --disable-gpu-sandbox flag with electron apps solved it for me.
The underlying problem seems to be that the Mac OS sandbox is preventing the GPU process to spawn properly.
You can specify a variety of entitlements when packaging your application, but not all entitlements are created equally, especially entitlements that want access to the keychain, secure enclave and TouchID.
If you're specifying a provisioning profile - make sure that all those entitlements are only in the original file, keep your inherited entitlements empty or to the bare minimum. In my case, I had the keychain-access-groups specified in my inherited entitlements which was a painful lesson to learn. Removing it made the builds not crash!
I believe in your case it's likely that you tried to access files outside of the application itself which might have caused the sandbox to prevent opening the GPU processes.
I know the OP reported this against MacOS, but on my Windows 10 VM I used the following instructions to create the electron-quick-start app…
net use T: \\busdata\company\BrianT
T:
cd \Development\Sandbox\electron
"C:\Users\thomasb\AppData\Local\GitHubDesktop\app-2.9.15\resources\app\git\cmd\git.exe" clone https://github.com/electron/electron-quick-start
cd electron-quick-start
npm install && npm start
…and then electron wrote error messages to the console, the same errors as those reported by the OP:
[5796:1025/121431.238:ERROR:gpu_process_host.cc(969)] GPU process launch failed: error_code=18
[5796:1025/121431.328:FATAL:gpu_data_manager_impl_private.cc(441)] GPU process isn't usable. Goodbye.
An earlier answer mentioned symbolic links, and to investigate that further I xcopied the entire electron-quick-start folder down from T: (a remapped network folder) to C: (my local disk).
When I then ran npm start in the folder that I'd copied down to C: there was no error.
Looks like electron is being fussy about where the source files live.
I had the same Issue when running the files off of a server such as a nas, but moving files to local storage solved the issue.

Error while building erlang project with leveldb

I am getting the error with leveldb while running the following.
./rebar3 shell
The dependency {eleveldb, "2.2.20"} compiled fine for me when I executed $ rebar3 shell on Mac OSX 10.13.6.
Your error message says that you should upgrade rebar3. Did you do that?
Finally, don't ever post screen shots of your output--instead post the output itself. Presumably, you know how to copy and paste text.

XCode error: failed to launch -- 'A' packet returned an error: -1

I have recently upgraded to XCode 5, since I upgraded the iOS Simulators stopped working. They simply wouldn't launch my app. I can run it off of my device no problem, but the simulators won't work. Since I can run it on my device, this is no problem... however when I try to write a command line application, I'm given this error:
XCode error: failed to launch TestApplication -- 'A' packet returned an error: -1
This even happens when I try to run the command line template that is generated by Xcode when I create a new project... as in the blank "Hello World" command line project.
On another machine, XCode 5 works just fine. There's not much of a technical difference between the two machines. Both are Macbook Pros.
Has anyone encountered this or does anyone know the cause or how this can be resolved?

Resources