electron / windows-installer

Build Windows Installers for Electron apps
MIT License
1.58k stars 261 forks source link

Unable to Build for Windows on Linux, Error: "Can't find custom attr constructor image" #210

Open k9withabone opened 7 years ago

k9withabone commented 7 years ago

I am unable to build for Windows on Linux. I am getting a "Can't find custom attr constructor image" error.

Console output:

✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets:
✖ Making for target: squirrel - On platform: win32 - For arch: x64

An unhandled error has occurred inside Forge:
An error occured while making for target: squirrel
Failed with exit code: null
Output:
Can't find custom attr constructor image: /home/paul/.nvm/versions/node/v8.4.0/lib/node_modules/electron-forge/node_modules/electron-winstaller/vendor/nuget.exe mtoken: 0x0a000a76
Unhandled loader error: 8, (null) System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (null)
* Assertion: should not be reached at loader.c:298

Stacktrace:

Native stacktrace:

    mono() [0x49ff2f]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7fe1011f1390]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7fe100e4b428]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7fe100e4d02a]
    mono() [0x630409]
    mono() [0x63069c]
    mono() [0x630833]
    mono() [0x54357a]
    mono(mono_class_from_typeref_checked+0x223) [0x524c63]
    mono() [0x5234ad]
    mono(mono_metadata_parse_mh_full+0x497) [0x5620b7]
    mono() [0x433fd6]
    mono() [0x500b39]
    mono() [0x501fbd]
    mono() [0x425db6]
    mono() [0x426749]
    mono(mono_runtime_invoke+0x3d) [0x5ac68d]
    mono(mono_runtime_exec_main+0x10d) [0x5aea1d]
    mono(mono_main+0x1177) [0x476967]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fe100e36830]
    mono(_start+0x29) [0x422e79]

Debug info from gdb:

[New LWP 6309]
[New LWP 6310]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fe1011f0f7b in __waitpid (pid=6311, stat_loc=0x7ffdc105423c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
29  ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
  Id   Target Id         Frame 
* 1    Thread 0x7fe101d07780 (LWP 6308) "mono" 0x00007fe1011f0f7b in __waitpid (pid=6311, stat_loc=0x7ffdc105423c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
  2    Thread 0x7fe1003ff700 (LWP 6309) "mono" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7fe0fe315700 (LWP 6310) "Finalizer" 0x00007fe1011ef827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x956820) at ../sysdeps/unix/sysv/linux/futex-internal.h:205

Thread 3 (Thread 0x7fe0fe315700 (LWP 6310)):
#0  0x00007fe1011ef827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x956820) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x956820, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007fe1011ef8d4 in __new_sem_wait_slow (sem=0x956820, abstime=0x0) at sem_waitcommon.c:181
#3  0x00007fe1011ef97a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:29
#4  0x0000000000622e06 in mono_sem_wait ()
#5  0x00000000005a5742 in ?? ()
#6  0x0000000000587b2b in ?? ()
#7  0x0000000000629a8c in ?? ()
#8  0x00007fe1011e76ba in start_thread (arg=0x7fe0fe315700) at pthread_create.c:333
#9  0x00007fe100f1d3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fe1003ff700 (LWP 6309)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00000000005fdcdb in ?? ()
#2  0x00007fe1011e76ba in start_thread (arg=0x7fe1003ff700) at pthread_create.c:333
#3  0x00007fe100f1d3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fe101d07780 (LWP 6308)):
#0  0x00007fe1011f0f7b in __waitpid (pid=6311, stat_loc=0x7ffdc105423c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00000000004a0006 in ?? ()
#2  <signal handler called>
#3  0x00007fe100e4b428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#4  0x00007fe100e4d02a in __GI_abort () at abort.c:89
#5  0x0000000000630409 in ?? ()
#6  0x000000000063069c in ?? ()
#7  0x0000000000630833 in ?? ()
#8  0x000000000054357a in ?? ()
#9  0x0000000000524c63 in mono_class_from_typeref_checked ()
#10 0x00000000005234ad in ?? ()
#11 0x00000000005620b7 in mono_metadata_parse_mh_full ()
#12 0x0000000000433fd6 in ?? ()
#13 0x0000000000500b39 in ?? ()
#14 0x0000000000501fbd in ?? ()
#15 0x0000000000425db6 in ?? ()
#16 0x0000000000426749 in ?? ()
#17 0x00000000005ac68d in mono_runtime_invoke ()
#18 0x00000000005aea1d in mono_runtime_exec_main ()
#19 0x0000000000476967 in mono_main ()
#20 0x00007fe100e36830 in __libc_start_main (main=0x422be0, argc=9, argv=0x7ffdc1056108, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdc10560f8) at ../csu/libc-start.c:291
#21 0x0000000000422e79 in _start ()

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Error: Failed with exit code: null
Output:
Can't find custom attr constructor image: /home/paul/.nvm/versions/node/v8.4.0/lib/node_modules/electron-forge/node_modules/electron-winstaller/vendor/nuget.exe mtoken: 0x0a000a76
Unhandled loader error: 8, (null) System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 (null)
* Assertion: should not be reached at loader.c:298

Stacktrace:

Native stacktrace:

    mono() [0x49ff2f]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7fe1011f1390]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7fe100e4b428]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7fe100e4d02a]
    mono() [0x630409]
    mono() [0x63069c]
    mono() [0x630833]
    mono() [0x54357a]
    mono(mono_class_from_typeref_checked+0x223) [0x524c63]
    mono() [0x5234ad]
    mono(mono_metadata_parse_mh_full+0x497) [0x5620b7]
    mono() [0x433fd6]
    mono() [0x500b39]
    mono() [0x501fbd]
    mono() [0x425db6]
    mono() [0x426749]
    mono(mono_runtime_invoke+0x3d) [0x5ac68d]
    mono(mono_runtime_exec_main+0x10d) [0x5aea1d]
    mono(mono_main+0x1177) [0x476967]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fe100e36830]
    mono(_start+0x29) [0x422e79]

Debug info from gdb:

[New LWP 6309]
[New LWP 6310]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007fe1011f0f7b in __waitpid (pid=6311, stat_loc=0x7ffdc105423c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
29  ../sysdeps/unix/sysv/linux/waitpid.c: No such file or directory.
  Id   Target Id         Frame 
* 1    Thread 0x7fe101d07780 (LWP 6308) "mono" 0x00007fe1011f0f7b in __waitpid (pid=6311, stat_loc=0x7ffdc105423c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
  2    Thread 0x7fe1003ff700 (LWP 6309) "mono" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7fe0fe315700 (LWP 6310) "Finalizer" 0x00007fe1011ef827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x956820) at ../sysdeps/unix/sysv/linux/futex-internal.h:205

Thread 3 (Thread 0x7fe0fe315700 (LWP 6310)):
#0  0x00007fe1011ef827 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x956820) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x956820, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007fe1011ef8d4 in __new_sem_wait_slow (sem=0x956820, abstime=0x0) at sem_waitcommon.c:181
#3  0x00007fe1011ef97a in __new_sem_wait (sem=<optimized out>) at sem_wait.c:29
#4  0x0000000000622e06 in mono_sem_wait ()
#5  0x00000000005a5742 in ?? ()
#6  0x0000000000587b2b in ?? ()
#7  0x0000000000629a8c in ?? ()
#8  0x00007fe1011e76ba in start_thread (arg=0x7fe0fe315700) at pthread_create.c:333
#9  0x00007fe100f1d3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7fe1003ff700 (LWP 6309)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x00000000005fdcdb in ?? ()
#2  0x00007fe1011e76ba in start_thread (arg=0x7fe1003ff700) at pthread_create.c:333
#3  0x00007fe100f1d3dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7fe101d07780 (LWP 6308)):
#0  0x00007fe1011f0f7b in __waitpid (pid=6311, stat_loc=0x7ffdc105423c, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:29
#1  0x00000000004a0006 in ?? ()
#2  <signal handler called>
#3  0x00007fe100e4b428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#4  0x00007fe100e4d02a in __GI_abort () at abort.c:89
#5  0x0000000000630409 in ?? ()
#6  0x000000000063069c in ?? ()
#7  0x0000000000630833 in ?? ()
#8  0x000000000054357a in ?? ()
#9  0x0000000000524c63 in mono_class_from_typeref_checked ()
#10 0x00000000005234ad in ?? ()
#11 0x00000000005620b7 in mono_metadata_parse_mh_full ()
#12 0x0000000000433fd6 in ?? ()
#13 0x0000000000500b39 in ?? ()
#14 0x0000000000501fbd in ?? ()
#15 0x0000000000425db6 in ?? ()
#16 0x0000000000426749 in ?? ()
#17 0x00000000005ac68d in mono_runtime_invoke ()
#18 0x00000000005aea1d in mono_runtime_exec_main ()
#19 0x0000000000476967 in mono_main ()
#20 0x00007fe100e36830 in __libc_start_main (main=0x422be0, argc=9, argv=0x7ffdc1056108, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffdc10560f8) at ../csu/libc-start.c:291
#21 0x0000000000422e79 in _start ()

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

    at ChildProcess.proc.on.code (/home/paul/.nvm/versions/node/v8.4.0/lib/node_modules/electron-forge/node_modules/electron-winstaller/lib/spawn-promise.js:62:16)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at maybeClose (internal/child_process.js:927:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

Comand Line Argument:

electron-forge make --platform=win32

package.json

{
  "name": "thinkbox-stl-volume-calculator",
  "version": "0.1.0",
  "description": "Volume calculator for use at think[box]",
  "author": "Paul Nettleton",
  "id": "firebird42",
  "license": "LicenseRef-LICENSE",
  "main": "src/main.js",
  "dependencies": {
    "electron-compile": "^6.4.2",
    "electron-squirrel-startup": "^1.0.0",
    "mathjs": "^3.16.4",
    "parse-stl": "^1.0.2",
    "stl": "^1.1.1",
    "stl-reader": "^3.0.1"
  },
  "build": {
    "appId": "com.firebird.${name}",
    "mac": {
      "category": "public.app-category.utilities"
    }
  },
  "scripts": {
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "electron-forge make"
  },
  "devDependencies": {
    "babel-plugin-transform-async-to-generator": "^6.24.1",
    "babel-preset-env": "^1.6.0",
    "babel-preset-react": "^6.24.1",
    "electron-forge": "^4.1.2",
    "electron-prebuilt-compile": "1.7.8"
  },
  "config": {
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "zip",
          "dmg"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {},
      "electronWinstallerConfig": {
        "name": ""
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "",
        "name": ""
      },
      "windowsStoreConfig": {
        "packageName": ""
      }
    }
  }
}

Repo located here: https://github.com/searsthinkbox/stl_volume_calculator

AhmadIbrahiim commented 4 years ago

Have you got any update on this issue?

I'm getting this also. ` =================================================================================

ENV Summary:

TIME: Sat Jan 18 2020 11:52:08 GMT+0200 (Eastern European Standard Time)
TITLE: ember
ARGV:
- /home/ahmed/.nvm/versions/node/v10.17.0/bin/node
- /home/ahmed/Desktop/MaxmioTech/linkedinscraper/node_modules/.bin/ember
- electron:make
- --platform
- win32
EXEC_PATH: /home/ahmed/.nvm/versions/node/v10.17.0/bin/node
TMPDIR: /tmp
SHELL: /bin/bash
PATH:
- /tmp/yarn--1579340895570-0.3694315410982498
- /home/ahmed/Desktop/MaxmioTech/linkedinscraper/node_modules/.bin
- /home/ahmed/.config/yarn/link/node_modules/.bin
- /home/ahmed/.yarn/bin
- /home/ahmed/.nvm/versions/node/v10.17.0/libexec/lib/node_modules/npm/bin/node-gyp-bin
- /home/ahmed/.nvm/versions/node/v10.17.0/lib/node_modules/npm/bin/node-gyp-bin
- /home/ahmed/.nvm/versions/node/v10.17.0/bin/node_modules/npm/bin/node-gyp-bin
- /home/ahmed/.nvm/versions/node/v10.17.0/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
- /snap/bin
PLATFORM: linux x64
FREEMEM: 726142976
TOTALMEM: 8247721984
UPTIME: 358316
LOADAVG: 2.65869140625,1.86376953125,1.52001953125
CPUS:
- Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz - 2793
- Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz - 2822
- Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz - 2797
- Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz - 3009
ENDIANNESS: LE
VERSIONS:
- ares: 1.15.0
- brotli: 1.0.7
- cldr: 35.1
- http_parser: 2.8.0
- icu: 64.2
- modules: 64
- napi: 5
- nghttp2: 1.39.2
- node: 10.17.0
- openssl: 1.1.1d
- tz: 2019a
- unicode: 12.1
- uv: 1.28.0
- v8: 6.8.275.32-node.54
- zlib: 1.2.11

ERROR Summary:

- broccoliBuilderErrorStack: [undefined]
- code: [undefined]
- codeFrame: [undefined]
- errorMessage: An error occured while making for target: squirrel
- errorType: [undefined]
- location:
  - column: [undefined]
  - file: [undefined]
  - line: [undefined]
- message: An error occured while making for target: squirrel
- name: [undefined]
- nodeAnnotation: [undefined]
- nodeName: [undefined]
- originalErrorMessage: [undefined]
- stack: Failed with exit code: 255

Output:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies. File name: 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' Can't find custom attr constructor image: /home/ahmed/Desktop/MaxmioTech/linkedinscraper/node_modules/electron-forge/node_modules/electron-winstaller/vendor/nuget.exe mtoken: 0x0a000a76 due to Could not load file or assembly or one of its dependencies. assembly:System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type: member:

Error: Failed with exit code: 255 Output:

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies. File name: 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' Can't find custom attr constructor image: /home/ahmed/Desktop/MaxmioTech/linkedinscraper/node_modules/electron-forge/node_modules/electron-winstaller/vendor/nuget.exe mtoken: 0x0a000a76 due to Could not load file or assembly or one of its dependencies. assembly:System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type: member:

  at ChildProcess.proc.on.code (/home/ahmed/Desktop/MaxmioTech/linkedinscraper/node_modules/electron-forge/node_modules/electron-winstaller/lib/spawn-promise.js:62:16)
  at ChildProcess.emit (events.js:198:13)
  at ChildProcess.EventEmitter.emit (domain.js:448:20)
  at maybeClose (internal/child_process.js:982:16)
  at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)

================================================================================= `

malept commented 4 years ago

System.IO.FileNotFoundException: Could not load file or assembly or one of its dependencies.

I suspect that this is an incomplete mono installation, although I don't have any advice as to how to fix it.

groundgirl commented 4 years ago

I had this issue, installing mono-devel fixed it.