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

Can't run app built from travis (corrupted asar) #2440

Closed
magne4000 opened this issue Jan 5, 2018 · 8 comments
Closed

Can't run app built from travis (corrupted asar) #2440

magne4000 opened this issue Jan 5, 2018 · 8 comments

Comments

@magne4000
Copy link

  • Version: 19.27.3, 19.52.1
  • Target: OSX 0.13.2, XCode 9.2

Building manually with yarn run make on my Macbook actually generates a valid build, but travis generates a build that shows the following error upon launch:

image

NB yarn run make actually runs cross-env NODE_ENV=production build --config electron-builder.yml

electron-builder.yml

appId: org.efounders.BrowserXCanary
productName: 'Station Canary'
mac:
  category: public.app-category.tools
  icon: 'build/icon-canary.icns'

asar: true
asarUnpack: [ "**/node_modules/sharp/**/*" ]
electronCompile: true

directories:
  output: release

protocols:
  name: Station
  schemes:
  - station

dmg:
  contents:
  - x: 410
    y: 150
    type: link
    path: "/Applications"
  - x: 130
    y: 150
    type: file

win:
  icon: 'build/icon-canary.ico'
  target:
  - squirrel

linux:
  target:
  - deb
  - AppImage

files:
  - "!app/theme/scss${/*}"

.travis.yml

language: node_js

os:
  - osx

osx_image: xcode9.2

node_js:
  - "8"

cache:
  yarn: false

script:
  - yarn run test
  - yarn run make
@magne4000
Copy link
Author

I tried to extract the package.json of the error message, and the content is actually wrong (it has the partial content of another file). So could it be related to how the asar is created ?

@magne4000 magne4000 changed the title Can't run app built from travis Can't run app built from travis (corrupted asar) Jan 7, 2018
@alexstrat
Copy link

The resulting asar have same corruption issues than in #662

@magne4000
Copy link
Author

Here is a zip of the build that contains a corrupted asar file https://s3.amazonaws.com/dev.getstation.com/Station.Canary-0.12.24-mac.zip

@develar
Copy link
Member

develar commented Jan 8, 2018

Could you please ensure that 19.52.1 is used on Travis? Could you please try to set env USE_HARD_LINKS=false on Travis? And provide travis log?

@magne4000
Copy link
Author

Retried a build with 19.52.1 and USE_HARD_LINKS=false, we still have an offset related error:
image

Here is the related artifact:
https://s3.amazonaws.com/dev.getstation.com/Station.Canary-0.12.25-mac.zip

@magne4000
Copy link
Author

And the travis log https://s3.amazonaws.com/dev.getstation.com/log.txt

@alexstrat
Copy link

For information, we are able to make a valid build of onshape-desktop-shell on Travis.
With the same configuration, we can't have a valid build for our app.

@magne4000
Copy link
Author

It's working now with latest version (2.11.1) and electron 2.0.0

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

No branches or pull requests

3 participants