Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action fails with wails 2.3.1 on MacOS due to ditto error #11

Open
gmlewis opened this issue Jan 10, 2023 · 13 comments
Open

Action fails with wails 2.3.1 on MacOS due to ditto error #11

gmlewis opened this issue Jan 10, 2023 · 13 comments
Assignees

Comments

@gmlewis
Copy link

gmlewis commented Jan 10, 2023

When running this action on GitHub with the darwin/universal platform and wails version 2.3.1, the run fails on the ditto step with the following error:

Run wails build --platform darwin/universal -webview2 download -o wailsTest
Wails CLI v2.3.1


# Build Options

Platform(s)        | darwin/universal                                     
Compiler           | /Users/runner/hostedtoolcache/go/1.19.4/x64/bin/go   
Skip Bindings      | false                                                
Build Mode         | production                                           
Frontend Directory | /Users/runner/work/cohort-wails/cohort-wails/frontend
Obfuscated         | false                                                
Skip Frontend      | false                                                
Compress           | false                                                
Package            | true                                                 
Clean Bin Dir      | false                                                
LDFlags            |                                                      
Tags               | []                                                   
Race Detector      | false                                                
Output File        | wailsTest                                            

# Building target: darwin/universal

  • Generating bindings: Done.
  • Installing frontend dependencies: Done.
  • Compiling frontend: Done.
  • Compiling application: Done.
  • Packaging application: Done.
Built '/Users/runner/work/cohort-wails/cohort-wails/build/bin/cohort-wails.app/Contents/MacOS/cohort-wails' in 3m25.443s.

 ♥   If Wails is useful to you or your company, please consider sponsoring the project:
https://github.com/sponsors/leaanthony
Run chmod +x build/bin/*/Contents/MacOS/*
  chmod +x build/bin/*/Contents/MacOS/*
  shell: /bin/bash --noprofile --norc -e -o pipefail {0}
Run ditto -c -k ./build/bin/wailsTest.app ./build/bin/wailsTest.app.zip
  ditto -c -k ./build/bin/wailsTest.app ./build/bin/wailsTest.app.zip
  shell: /bin/bash --noprofile --norc -e -o pipefail {0}
ditto: Cannot get the real path for source './build/bin/wailsTest.app'
Error: Process completed with exit code 1.
@Snider Snider self-assigned this Jan 10, 2023
@Snider
Copy link
Contributor

Snider commented Jan 10, 2023

Hiya,

We found a bug in wails for macOS builds with a different name.

image

https://github.com/dAppServer/wails-build-action/actions/runs/3885309312/jobs/6629024935

You can "fix" this using the same 'build-name' as defined in the wails app settings; linux and windows honour this so its a bug for @leaanthony

macos:
    runs-on: macos-latest
    steps:
      # Checkout code
      - uses: actions/checkout@v3
        with:
          submodules: recursive
      - uses: dAppServer/wails-build-action@v2
        with:
          build-name: cohort-wails
          build-platform: darwin/universal
          wails-build-webview2: "embed"
          wails-version: "v2.3.1"
          go-version: ^1.18
          sign: "false"

@leaanthony
Copy link

Interesting! Please open a ticket on the Wails repo 🙏

@Snider
Copy link
Contributor

Snider commented Jan 10, 2023

Interesting! Please open a ticket on the Wails repo 🙏

wailsapp/wails#2290 :) 🙏

@Snider
Copy link
Contributor

Snider commented Jan 30, 2023

Just to update people interested in this @gwynforthewyn is working on the fix atm, once Wails publishes a version with her fix, this issue will be resolved by increasing the wails version.

@Cystemzz
Copy link

Any updates on this?

@phuclh
Copy link

phuclh commented Jan 18, 2024

Any updates on this, I got this error when building macOS

ditto: Can't archive multiple sources
Usage: ditto [ <options> ] src [ ... src ] dst
Error: Process completed with exit code 1.

@phuclh
Copy link

phuclh commented Jan 18, 2024

Any updates on this, I got this error when building macOS

ditto: Can't archive multiple sources
Usage: ditto [ <options> ] src [ ... src ] dst
Error: Process completed with exit code 1.

Looks like the space in file name caused this error, but when I tried to remove the space, then got another error

ditto: Cannot get the real path for source './build/bin/App.app'

@gwynforthewyn
Copy link

Huh; I thought I had fixed this long ago. I can try dusting off my recollections of wails : )

@phuclh
Copy link

phuclh commented Jan 18, 2024

Huh; I thought I had fixed this long ago. I can try dusting off my recollections of wails : )

Is it possible for you to take a look at it one more time?

@dAppServer dAppServer deleted a comment from sonic57blue Feb 6, 2024
@txbrown
Copy link

txbrown commented Feb 19, 2024

Any updates on this, I got this error when building macOS

ditto: Can't archive multiple sources
Usage: ditto [ <options> ] src [ ... src ] dst
Error: Process completed with exit code 1.

Just bumping this issue as I am also facing this issue at the moment.

@txbrown
Copy link

txbrown commented Feb 19, 2024

It seems this issue happens whenever the app name has a space. My app is named "MIDI Scout" and renaming to "MIDIScout" fixed the issue.

@pmabres
Copy link

pmabres commented Mar 13, 2024

I would recommend to just copy this action and include it into your own repo and apply some fixes yourself.
If you are working with a monorepo for example, you'll see that this fails when you have a custom path for your app working directory:

    - name: Build .app zip file
      if: runner.os == 'macOS'
      working-directory: ${{ inputs.app-working-directory }}
      shell: bash
      run: |
        ditto -c -k ${{ inputs.app-working-directory }}/build/bin/${{inputs.build-name}}.app ${{ inputs.app-working-directory }}/build/bin/${{inputs.build-name}}.app.zip

This is due to the fact that working-directory: ${{ inputs.app-working-directory }} is being used whilst also ditto tries to compress the file using app-working-directory as well.

This issue is seen across many different places:
name: Building Installer
name: Notarising Installer and zip

and also the last few release steps are missing that as well:

# Upload build assets
    - uses: actions/upload-artifact@v3
      if: inputs.package == 'true'
      with:
        name: Wails Build ${{runner.os}} ${{inputs.build-name}}
        path: |
          */bin/
          *\bin\*
    - name: Release
      uses: softprops/action-gh-release@v1
      if: inputs.package == 'true' && startsWith(github.ref, 'refs/tags/')
      with:
        files: |
          */bin/*

should have ${{ inputs.app-working-directory }} embedded in the path filter of each action

@jordanamr
Copy link

Still unsolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

9 participants