Closed joh6nn closed 1 year ago
Hi @joh6nn thanks for the info.
Let's see whats happening:
The first warning is normal: we don't currently sign the app, the builder package shows a warning and all should still work. I see the package is generated so all ok for now.
The error with the long log also makes sense, an auto-updater function is called on start and it fails because it doesn't find the macOS executable released in the repo. This shouldn't break cerebro (I usually get this error because I try unpublished versions while developing)
It would be a great help if you could access the console
tab in the developer tools.
Here โฌ๏ธ
Please send a screenshot so I can see what's going wrong there.
Thanks again!
Output from the console is
Uncaught Error: Cannot find module 'nodobjc'
Require stack:
- /Applications/Cerebro.app/Contents/Resources/app.asar/main/index.html
at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
at i._resolveFilename (node:electron/js2c/renderer_init:33:1095)
at Module._load (node:internal/modules/cjs/loader:785:27)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at i._load (node:electron/js2c/renderer_init:33:356)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at index.js:16:27846
at index.js:1:695
at Object.darwin (index.js:211:1458)
Seems to be an error with some of our dependencies. Maybe @cerebroapp/cerebro-ui
is failing beacuse it is not bundled correctly
It 'nodobjc' is being imported here
But is not specified in the package.json of the package.
Please, try running yarn add nodobjc
in the Cerebro repo and then package again the executable with yarn package
. This should make the nodobjc
module available.
new errors are a kind of progress, right? ๐
% yarn add nodobjc
yarn add v1.22.19
[1/4] ๐ Resolving packages...
[2/4] ๐ Fetching packages...
[3/4] ๐ Linking dependencies...
warning " > @cerebroapp/cerebro-ui@2.0.0-alpha.2" has incorrect peer dependency "electron@19.0.7".
warning " > react-markdown@8.0.3" has unmet peer dependency "@types/react@>=16".
warning "eslint-plugin-jest > @typescript-eslint/utils > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] ๐จ Building fresh packages...
[1/7] โ electron
[6/7] โ ref
[-/7] โ waiting...
[-/7] โ waiting...
error /Users/joh6nn/Code/cerebro/node_modules/ref: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: /Users/joh6nn/Code/cerebro/node_modules/ref
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@9.1.0
gyp info using node@18.9.0 | darwin | arm64
gyp info find Python using Python version 3.9.6 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args '/opt/homebrew/Cellar/node/18.9.0/libexec/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/Users/joh6nn/Code/cerebro/node_modules/ref/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/opt/homebrew/Cellar/node/18.9.0/libexec/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/Users/joh6nn/Library/Caches/node-gyp/18.9.0',
gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/Cellar/node/18.9.0/libexec/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/Users/joh6nn/Library/Caches/node-gyp/18.9.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/Users/joh6nn/Code/cerebro/node_modules/ref',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
CXX(target) Release/obj.target/binding/src/binding.o
../src/binding.cc:222:43: error: too few arguments to function call, single argument 'isolate' was not specified
bool persistent = info[3]->BooleanValue();
~~~~~~~~~~~~~~~~~~~~~ ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-value.h:408:8: note: 'BooleanValue' declared here
bool BooleanValue(Isolate* isolate) const;
^
../src/binding.cc:253:38: error: too few arguments to function call, single argument 'context' was not specified
size_t size = info[2]->Uint32Value();
~~~~~~~~~~~~~~~~~~~~ ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
^
../src/binding.cc:253:10: error: no viable conversion from 'Maybe<uint32_t>' (aka 'Maybe<unsigned int>') to 'size_t' (aka 'unsigned long')
size_t size = info[2]->Uint32Value();
^ ~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:360:23: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value _str(in);
^ ~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-primitive.h:517:5: note: candidate constructor not viable: no known conversion from 'Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-primitive.h:510:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
^
../src/binding.cc:447:23: error: no matching constructor for initialization of 'String::Utf8Value'
String::Utf8Value _str(in);
^ ~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-primitive.h:517:5: note: candidate constructor not viable: no known conversion from 'Local<v8::Value>' to 'const v8::String::Utf8Value' for 1st argument
Utf8Value(const Utf8Value&) = delete;
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-primitive.h:510:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
Utf8Value(Isolate* isolate, Local<v8::Value> obj);
^
../src/binding.cc:521:38: error: too few arguments to function call, single argument 'context' was not specified
size_t size = info[1]->Uint32Value();
~~~~~~~~~~~~~~~~~~~~ ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
^
../src/binding.cc:521:10: error: no viable conversion from 'Maybe<uint32_t>' (aka 'Maybe<unsigned int>') to 'size_t' (aka 'unsigned long')
size_t size = info[1]->Uint32Value();
^ ~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:550:44: error: too few arguments to function call, single argument 'context' was not specified
uint32_t numZeros = info[1]->Uint32Value();
~~~~~~~~~~~~~~~~~~~~ ^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-value.h:416:41: note: 'Uint32Value' declared here
V8_WARN_UNUSED_RESULT Maybe<uint32_t> Uint32Value(
^
../src/binding.cc:550:12: error: no viable conversion from 'Maybe<uint32_t>' (aka 'Maybe<unsigned int>') to 'uint32_t' (aka 'unsigned int')
uint32_t numZeros = info[1]->Uint32Value();
^ ~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:582:3: error: no matching member function for call to 'Set'
SET_SIZEOF(int8, int8_t);
^~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
../src/binding.cc:583:3: error: no matching member function for call to 'Set'
SET_SIZEOF(uint8, uint8_t);
^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
../src/binding.cc:584:3: error: no matching member function for call to 'Set'
SET_SIZEOF(int16, int16_t);
^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
../src/binding.cc:585:3: error: no matching member function for call to 'Set'
SET_SIZEOF(uint16, uint16_t);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
../src/binding.cc:586:3: error: no matching member function for call to 'Set'
SET_SIZEOF(int32, int32_t);
^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
../src/binding.cc:587:3: error: no matching member function for call to 'Set'
SET_SIZEOF(uint32, uint32_t);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
../src/binding.cc:588:3: error: no matching member function for call to 'Set'
SET_SIZEOF(int64, int64_t);
^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
../src/binding.cc:589:3: error: no matching member function for call to 'Set'
SET_SIZEOF(uint64, uint64_t);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
../src/binding.cc:590:3: error: no matching member function for call to 'Set'
SET_SIZEOF(float, float);
^~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
../src/binding.cc:591:3: error: no matching member function for call to 'Set'
SET_SIZEOF(double, double);
^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/binding.cc:581:9: note: expanded from macro 'SET_SIZEOF'
smap->Set(Nan::New<v8::String>( #name ).ToLocalChecked(), Nan::New<v8::Uint32>(static_cast<uint32_t>(sizeof(type))));
~~~~~~^~~
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:244:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context,
^
/Users/joh6nn/Library/Caches/node-gyp/18.9.0/include/node/v8-object.h:247:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/homebrew/Cellar/node/18.9.0/libexec/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/opt/homebrew/Cellar/node/18.9.0/bin/node" "/opt/homebrew/Cellar/node/18.9.0/libexec/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/joh6nn/Code/cerebro/node_modules/ref
I ran
yarn add typescript@3.7.0-beta
, yarn add @types/react@16
and yarn add electron@19.0.7
to try and resolve the unmet dependencies warned about at the top, but that didn't help: same error when trying to add nodobjc
Thanks for your job @joh6nn
It seems that nodobjc
is too old (last update is from 7 years ago)
I'll search for an alterntive to implement but will be hard as I develop on Windows. When the new implementation is ready I'll come back to tell you.
Thanks ๐
Could you please tell us what node versiรณn are you using?
You can run node -v
for that.
node is version 18.9.0
Ok, thank you
Issue
I am a new user of Cerebro, so my apologies if I'm missing things or not understanding intended behaviors. After force installing the dependencies with
yarn --force
, I built withyarn package
. There were no errors when building, and only 1 warning:I'm unfamiliar with the values displayed in the warning, so I've redacted them in case they're private. I can provide them if needed
When clicking on the app from the Applications folder, the screen briefly flashes, and then nothing else happens. From the terminal, I can see that a Cerebro process is running, but nothing is visible on the screen and no icon is present in the menu bar. Pressing ctrl+shift causes the active window to lose focus, but no window is displayed. Hitting ctrl+shift refocuses the previously active window. I believe this means that Cerebro is showing and hiding a window, but that the window is not visible.
Toggling "developerMode" in the config.json doesn't appear to have any effect.
Inspecting the app bundle from the terminal, I found the following file:
/Applications/Cerebro.app/Contents/MacOS/Cerebro
. I tried running that, and got the following output:If I reboot, I sometimes get the icon in the menubar. The menu appears to be working (eg, the Donate Link opens the correct url), but the windows are still not visible. From the menu, I can get the main devtools window to open. Highlighting elements in the devtools seems to show that they're being created, just not displayed correctly:
In sessions where I reboot and the icon appears in the menu, if I quit Cerebro from the menu and restart it, the icon doesn't reappear.
I wasn't able to find any logs, but if you tell me where to look I'll do my best to gather data from them.