wailsapp / wails

Create beautiful applications using Go
https://wails.io
MIT License
25.27k stars 1.22k forks source link

[Linux] wails dev weird behaviour #2486

Closed marcio199226 closed 1 year ago

marcio199226 commented 1 year ago

Description

There are 2 issues when building in dev mode

  1. the procudre remain stuck on Compiling frontend: task until i press ctrl + c
  2. Once I click ctrl+c the procedure goes on but fails with no space left on device error (I have free space)
wails dev -v 2
Wails CLI v2.4.0

Executing: go mod tidy
  • Generating bindings:  INFO  
Done.
  • Installing frontend dependencies: 
 INFO  Install command: 'npm install'
Skipping npm install
Done.
  • Compiling frontend: 
 INFO  Build command: 'npm run serve'
^C    
    > mchat-desktop@0.0.0 serve /home/oskar/projects/mchat/mchat-desktop-client/frontend
    > npx --max_old_space_size=4096 ng serve --poll=2000 --host=0.0.0.0 --configuration development

    Initial Chunk Files   | Names         |  Raw Size
    vendor.js             | vendor        |   4.95 MB |
    polyfills.js          | polyfills     | 318.01 kB |
    styles.css, styles.js | styles        | 292.74 kB |
    main.js               | main          | 172.96 kB |
    runtime.js            | runtime       |   6.51 kB |

    | Initial Total |   5.72 MB

    Build at: 2023-03-13T09:23:13.204Z - Hash: cd027445bcbd950e - Time: 10579ms

    ** Angular Live Development Server is listening on 0.0.0.0:4200, open your browser on http://localhost:4200/ **

    ✔ Compiled successfully.

    Warning: This is a simple server for use in testing or debugging Angular applications
    locally. It hasn't been reviewed for security issues.

    Binding this server to an open connection can result in compromising your application or
    computer. Using a different host than the one passed to the "--host" flag might result in
    websocket connection issues. You might need to use "--disable-host-check" if that's the
    case.
    - Generating browser application bundles (phase: setup)...
    ✔ Browser application bundle generation complete.

    Warning: '/home/oskar/projects/mchat/mchat-desktop-client/frontend/src/app/pages/home/home.component.scss' imports '~@angular/material/theming' with a tilde. Usage of '~' in imports is deprecated.

    Warning: /home/oskar/projects/mchat/mchat-desktop-client/frontend/node_modules/ng-qrcode/fesm2015/ng-qrcode.js depends on 'qrcode'. CommonJS or AMD dependencies can cause optimization bailouts.
    For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

Done.
Building application for development...
  • Generating bindings:  INFO  
Done.
  • Compiling application: 
 INFO  Build command: go build -gcflags "all=-N -l" -tags dev -o /home/oskar/projects/mchat/mchat-desktop-client/build/bin/mchat-desktop-dev-linux-amd64
  • Environment:%!(EXTRA string=CLUTTER_IM_MODULE=xim NVM_DIR=/home/oskar/.nvm LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36: LESSCLOSE=/usr/bin/lesspipe %s %s XDG_MENU_PREFIX=gnome- LANG=it_IT.UTF-8 DISPLAY=:0 PYENV_ROOT=/home/oskar/.pyenv GNOME_SHELL_SESSION_MODE=ubuntu COLORTERM=truecolor WASMER_DIR=/home/oskar/.wasmer NVM_CD_FLAGS= USERNAME=oskar XDG_VTNR=2 SSH_AUTH_SOCK=/run/user/1000/keyring/ssh MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path S_COLORS=auto XDG_SESSION_ID=2 USER=oskar DESKTOP_SESSION=ubuntu QT4_IM_MODULE=xim GOPATH=/home/oskar/go TEXTDOMAINDIR=/usr/share/locale/ GNOME_TERMINAL_SCREEN=/org/gnome/Terminal/screen/011ffac1_dff1_46d2_9752_cc9650e19176 DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path PWD=/home/oskar/projects/mchat/mchat-desktop-client HOME=/home/oskar GOROOT=/home/oskar/.go TEXTDOMAIN=im-config SSH_AGENT_PID=8079 QT_ACCESSIBILITY=1 LIBVIRT_DEFAULT_URI=qemu:///system XDG_SESSION_TYPE=x11 XDG_DATA_DIRS=/usr/share/ubuntu:/home/oskar/.local/share/flatpak/exports/share/:/var/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop XDG_SESSION_DESKTOP=ubuntu GJS_DEBUG_OUTPUT=stderr GTK_MODULES=gail:atk-bridge WINDOWPATH=2 TERM=xterm-256color SHELL=/bin/bash VTE_VERSION=5202 QT_IM_MODULE=ibus XMODIFIERS=@im=ibus IM_CONFIG_PHASE=2 NVM_BIN=/home/oskar/.nvm/versions/node/v14.19.3/bin XDG_CURRENT_DESKTOP=ubuntu:GNOME GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 GNOME_TERMINAL_SERVICE=:1.95 PYENV_SHELL=bash XDG_SEAT=seat0 SHLVL=1 WASMER_CACHE_DIR=/home/oskar/.wasmer/cache GDMSESSION=ubuntu GNOME_DESKTOP_SESSION_ID=this-is-deprecated LOGNAME=oskar DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus XDG_RUNTIME_DIR=/run/user/1000 XAUTHORITY=/run/user/1000/gdm/Xauthority XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg PATH=/home/oskar/.pyenv/bin:/home/oskar/go/bin:/home/oskar/.wasmer/bin:/home/oskar/.nvm/versions/node/v14.19.3/bin:/home/oskar/.pyenv/shims:/home/oskar/.local/bin:/home/oskar/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/oskar/.pub-cache/bin:/home/oskar/.local/share/JetBrains/Toolbox/scripts:/home/oskar/go/bin:/home/oskar/.wasmer/globals/wapm_packages/.bin NVM_INC=/home/oskar/.nvm/versions/node/v14.19.3/include/node GJS_DEBUG_TOPICS=JS ERROR;JS LOG SESSION_MANAGER=local/CY4-RMOMA078:@/tmp/.ICE-unix/7985,unix/CY4-RMOMA078:/tmp/.ICE-unix/7985 LESSOPEN=| /usr/bin/lesspipe %s GTK_IM_MODULE=ibus _=/home/oskar/go/bin/wails OLDPWD=/home/oskar/projects/mchat/mchat-desktop-client/frontend CGO_CFLAGS= CGO_CXXFLAGS=-I/home/oskar/projects/mchat/mchat-desktop-client/build CGO_ENABLED=1 GOOS=linux GOARCH=amd64)Done.
  • Packaging application: Done.

INF | Serving assets from frontend DevServer URL: http://localhost:4200
Overriding existing handler for signal 10. Set JSC_SIGNAL_FOR_GC if you want WebKit to use a different signal
DEB | [DevWebServer] Waiting for frontend DevServer 'http://localhost:4200' to be ready

  ERROR   no space left on device
 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony

To Reproduce

Install wails and run wails dev

Expected behaviour

Should be able to run wails dev for development purposes

Screenshots

No response

Attempted Fixes

No response

System Details

wails doctor
Wails CLI v2.4.0

Scanning system - Please wait (this may take a long time)...Done.

# System

OS           | Ubuntu  
Version      | 18.04   
ID           | ubuntu  
Go Version   | go1.20.2
Platform     | linux   
Architecture | amd64   

# Wails

Version         | v2.4.0
Package Manager | apt   

# Dependencies

Dependency | Package Name          | Status    | Version                
*docker    | docker.io             | Installed | 23.0.1                 
gcc        | build-essential       | Installed | 12.4ubuntu1            
libgtk-3   | libgtk-3-dev          | Installed | 3.22.30-1ubuntu4       
libwebkit  | libwebkit2gtk-4.0-dev | Installed | 2.32.4-0ubuntu0.18.04.1
npm        | npm                   | Installed | 6.14.17                
*nsis      | nsis                  | Installed | v2.51-1                
pkg-config | pkg-config            | Installed | 0.29.1-0ubuntu2        
* - Optional Dependency

# Diagnosis

Your system is ready for Wails development!
 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony


### Additional context

_No response_
leaanthony commented 1 year ago

https://wails.io/docs/guides/troubleshooting#build-process-stuck-on-generating-bindings

Probably a blocking operation in the code.

marcio199226 commented 1 year ago

I will check but after wails.Run() my app does nothing:

package main

import (
    "embed"
    "log"

    "github.com/wailsapp/wails/v2"
    "github.com/wailsapp/wails/v2/pkg/logger"
    "github.com/wailsapp/wails/v2/pkg/options"
    "github.com/wailsapp/wails/v2/pkg/options/linux"
    "github.com/wailsapp/wails/v2/pkg/options/mac"
    "github.com/wailsapp/wails/v2/pkg/options/windows"
)

//go:embed frontend/dist
var assets embed.FS

func main() {
    // Create an instance of the app structure
    app := NewApp()

    // Create application with options
    err := wails.Run(&options.App{
        Title:             "mchat-desktop",
        Width:             1024,
        Height:            768,
        MinWidth:          1024,
        MinHeight:         768,
        DisableResize:     false,
        Fullscreen:        false,
        Frameless:         true,
        StartHidden:       false,
        HideWindowOnClose: false,
        Assets:            assets,
        LogLevel:          logger.DEBUG,
        OnStartup:         app.startup,
        OnDomReady:        app.domReady,
        OnShutdown:        app.shutdown,
        Bind: []interface{}{
            app,
        },
        // Windows platform specific options
        Windows: &windows.Options{
            WebviewIsTransparent: false,
            WindowIsTranslucent:  false,
            DisableWindowIcon:    false,
        },
        Linux: &linux.Options{
            WebviewTlsErrorsPolicyIgnore: true,
        },
        Mac: &mac.Options{TitleBar: mac.TitleBarHidden()},
    })

    if err != nil {
        log.Fatal(err)
    }
}
OlegGulevskyy commented 1 year ago

Could it be insufficient permissions or something like that? I remember I had similar error with not related thing to Wails, but when I was trying to set up some specific multipass from canonical instance (Ubuntu), I had similar error when running some commands like npm install and it was telling me about insufficient drive storage, which was not the case at all. I don't remember the solution exactly, as it was forever ago, but maybe it will ring a bell.. ?

marcio199226 commented 1 year ago

Ok I have resolved the issue, it was related to wails-angular-template issue 5 & wails-angular-template issue 4 The solution is provided in this pr

@leaanthony thanks !