Wails: packaged Windows application starts then crashes, debug version runs, how to debug .exe

Created on 8 Jan 2020  路  3Comments  路  Source: wailsapp/wails

Description

Go code and React frontend works fine in debug/dev mode. Wails serve starts, npm run start both work. After packaging the application into a Windows .exe and running it, the Webview flashes and ends. How can I debug the .exe?

I ran the executable file and got this error from Visual Studio
API server listening at: 127.0.0.1:29900
could not launch process: decoding dwarf section info at offset 0x0: too short
Process exiting with code: 1

To Reproduce
Steps to reproduce the behaviour:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behaviour
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.
Go Environment
go env

System Details

| Name | Value |
| ----- | ----- |
| Wails Version | v1.0.2-pre2 |
| Go Version | go1.13 |
| Platform | windows |
| Arch | amd64 |
| GO111MODULE | (Not Set) |
| GCC | 9.2.0 |
| Npm | 6.12.1 |
| Node | v12.13.1
|

Additional context
console output during running normally

Add any other context about the problem here.
wails bridge Connected to backend
init.js:26 wails bridge Loaded Wails Runtime
init.js:26 wails bridge Wails Ready
init.js:26 wails bridge Notifying application
index.js:1406 Warning: Invalid DOM property for. Did you mean htmlFor?
in label
in StyledComponent
in styled.label (at InputFileAttach.js:33)
in div
in StyledComponent
in styled.div (at InputFileAttach.js:32)
in InputFileAttach (at MainStep.js:27)
in div (at MainStep.js:19)
in MainStep (at src/index.js:12)
console. @ index.js:1406

RMConnStatus.js:11 Got RM token
DPConnStatus.js:13 connected to DocParser
index.js:1406 Warning: Each child in a list should have a unique "key" prop.

Check the render method of ParserList. See https://fb.me/react-warning-keys for more information.
in option (at ParserList.js:49)
in ParserList (at MainStep.js:29)
in div (at MainStep.js:19)
in MainStep (at src/index.js:12)
console. @ index.js:1406

ParserList.js:16 (23)聽[{鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥, {鈥]
ParserList.js:20 first parser return val: Parser id is now: gokavmvilpjy

Most helpful comment

I think it was an environment issue. I restarted the app by creating a new Wails project with init in a separate directory. I carefully added in only the node modules I needed. I made sure I could build an app at each step and have it run. I slowly added in my go code and bit by bit the React code. I put in global onerror in the html body. Never found any issue that caused any problem in the new directory/app. The only change made was to use htmlFor= in a

All 3 comments

Based on a quick google search, this sounds like an environment issue. Does anything in those links apply to your setup?

I think it was an environment issue. I restarted the app by creating a new Wails project with init in a separate directory. I carefully added in only the node modules I needed. I made sure I could build an app at each step and have it run. I slowly added in my go code and bit by bit the React code. I put in global onerror in the html body. Never found any issue that caused any problem in the new directory/app. The only change made was to use htmlFor= in a

I'm glad you found it! If there's anything you feel may help others, it would be great to have that as a PR in the docs1 repo. Good luck :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leaanthony picture leaanthony  路  6Comments

bh90210 picture bh90210  路  3Comments

leaanthony picture leaanthony  路  3Comments

maxiride picture maxiride  路  6Comments

yosefbenshimon picture yosefbenshimon  路  5Comments