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

Building a second Windows release gives a task was cancelled error #714

Closed
tom-james-watson opened this issue Aug 31, 2016 · 21 comments · May be fixed by qcif/data-curator#563
Closed

Building a second Windows release gives a task was cancelled error #714

tom-james-watson opened this issue Aug 31, 2016 · 21 comments · May be fixed by qcif/data-curator#563

Comments

@tom-james-watson
Copy link
Contributor

  • 6.3.1:
  • Squirrel.Windows:

I successfully built a first windows release and create a release on my github repository with the relevant build files attached. I have a squirrel server that is correctly finding these builds and I can install my application from the packages perfectly.

When I try to build a new version of the app, the build errors out with the below error. I am not entirely sure what the actual error is here. What is this /RELEASES url? Is that valid?

Here is the relevant config from my package.json:

"build": {
  "appId": "<redacted>",
  "category": "public.app-category.utilities",
  "asar": false,
  "win": {
    "iconUrl": "<redacted>",
    "remoteReleases": "https://github.com/tom-james-watson/artpip-app",
    "remoteToken": "<redacted>"
  }
},
"directories": {
  "output": "releases"
},

Any pointers? Let me know if you need more info.

Error:

Building Squirrel.Windows installer

Error: mono exited with code 255
Output:
Trying to download RELEASES index from https://github.com/tom-james-watson/artpip-app/RELEASES
Trying to download RELEASES index from https://github.com/tom-james-watson/artpip-app/RELEASES
Trying to download RELEASES index from https://github.com/tom-james-watson/artpip-app/RELEASES
Trying to download RELEASES index from https://github.com/tom-james-watson/artpip-app/RELEASES

Error output:
Attempting to sync URL as remote RELEASES folder
Failed to sync URL as GitHub repo: A task was canceled.
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: 404 (Not Found)
  at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode () <0x1138b6200 + 0x000f0> in <filename unknown>:0
  at System.Net.Http.HttpClient+<GetStringAsync>c__async6.MoveNext () <0x1138b48b0 + 0x00277> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
......
@develar
Copy link
Member

develar commented Sep 1, 2016

https://github.com/tom-james-watson/artpip-app

404 Not Found. Is it correct URL? remoteReleases

@tom-james-watson
Copy link
Contributor Author

Yeah, it's a private repository.

@develar
Copy link
Member

develar commented Sep 1, 2016

@tom-james-watson In this case please specify remoteToken (where remoteReleases defined, build.win.remoteToken) — https://help.github.com/articles/creating-an-access-token-for-command-line-use/

@develar
Copy link
Member

develar commented Sep 1, 2016

Hmm... it seems you in any case already specified GH_TOKEN.

@develar develar reopened this Sep 1, 2016
@develar develar closed this as completed in e102e3e Sep 1, 2016
@develar
Copy link
Member

develar commented Sep 1, 2016

GH_TOKEN now reused for Squirrel.Windows sync releases.

@tom-james-watson
Copy link
Contributor Author

Hello - thank you for your very quick fix! That has cleared that error.

However, I am now actually receiving the same error as #713

Please see error stack below

Error: Command failed: mono /Users/tomw/.cache/Squirrel.Windows/Squirrel.Windows-1.4.4/Update-Mono.exe --releasify /Users/tomw/git/artpip-app/releases/win/artpip-0.0.12-full.nupkg -
-releaseDir /Users/tomw/git/artpip-app/releases/win
2016-09-01 10:24:36> Unhandled exception: System.IO.FileNotFoundException: The base package release does not exist
File name: '/Users/tomw/git/artpip-app/releases/win/artpip-0.0.11-full.nupkg'

@tom-james-watson
Copy link
Contributor Author

Just to be clear - that file does exist before running the command, but it seems to get deleted during the process.

@develar
Copy link
Member

develar commented Sep 1, 2016

Strange... works for me. Is artpip-0.0.11-full.nupkg available on github?

@develar
Copy link
Member

develar commented Sep 1, 2016

We DO REMOVE old artifacts in the output directory to be sure that delta will be computed using correct artefact. And then Squirrel.Windows syncs releases.

@tom-james-watson
Copy link
Contributor Author

It is yeah, actually I presume that the problem is that it is a private respository. Is it using my remoteToken correctly when trying to fetch the files?

@develar
Copy link
Member

develar commented Sep 1, 2016

Is it using my remoteToken correctly when trying to fetch the files?

I don't know, it is Squirrel.Windows and I suppose it maybe buggy.

@develar
Copy link
Member

develar commented Sep 1, 2016

To be sure — artpip-0.0.11-full.nupkg available on github?

@tom-james-watson
Copy link
Contributor Author

Yeah, see below.

The file is available at https://github.com/tom-james-watson/artpip-app/releases/download/v0.0.11/artpip-0.0.11-full.nupkg

However, being a private repository it needs to use my remoteToken to be able to access this file. My squirrel server (which is configured with my token) can download these files fine.

image

@develar
Copy link
Member

develar commented Sep 1, 2016

Do you see artpip-0.0.11-full.nupkg file in the output directory during build? Please set env DEBUG=electron-builder

@develar
Copy link
Member

develar commented Sep 1, 2016

Please try to remove output directory completely and build again.

@tom-james-watson
Copy link
Contributor Author

Hello - removing my release directory and rebuilding everything worked once. However, trying again a few hours later to create a new version, I am getting the same error as earlier. I have ensured that I am DEFINITELY on 6.3.3. Any idea?

Here's the output:

Building Squirrel.Windows installer

  electron-builder Found existing Squirrel.Windows /Users/tomw/.cache/Squirrel.Windows/Squirrel.Windows-1.4.4 +4s
  electron-builder Spawning mono /Users/tomw/.cache/Squirrel.Windows/Squirrel.Windows-1.4.4/SyncReleases.exe -u https://github.com/tom-james-watson/artpip-app -r /Users/tomw/git/art
pip-app/releases/win -t 9ccbf6164718414abde1c5ec118fcf89aa002d7d +63ms
  electron-builder appdmg: [20] Removing temporary image +5s

Files read from disk: 3246
Archive size: 46056809 bytes (44 MiB)
Everything is Ok
  electron-builder /Users/tomw/git/artpip-app/node_modules/7zip-bin-osx/7za (15288) exited with code 0 +2s
Trying to download RELEASES index from https://github.com/tom-james-watson/artpip-app/RELEASES
Trying to download RELEASES index from https://github.com/tom-james-watson/artpip-app/RELEASES
Trying to download RELEASES index from https://github.com/tom-james-watson/artpip-app/RELEASES
Trying to download RELEASES index from https://github.com/tom-james-watson/artpip-app/RELEASES
Error: mono exited with code 255
Error output:
Attempting to sync URL as remote RELEASES folder
Failed to sync URL as GitHub repo: A task was canceled.
System.AggregateException: One or more errors occurred. ---> System.Net.Http.HttpRequestException: 404 (Not Found)
  at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode () <0x1120cc780 + 0x000f0> in <filename unknown>:0
  at System.Net.Http.HttpClient+<GetStringAsync>c__async6.MoveNext () <0x1120cae30 + 0x00277> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---

@develar
Copy link
Member

develar commented Sep 2, 2016

@tom-james-watson Fixed. Squirrel.Windows doesn't check files at all :(, so, RELEASES must be deleted also. Fixed version will be published soon.

@tom-james-watson
Copy link
Contributor Author

tom-james-watson commented Sep 2, 2016

I am still getting the same error as above. I ended up removing remoteReleases and remoteToken from config and then it builds fine. As far as I can tell, all this changes is that it will no longer produce delta updates. Is that correct? So if my app auto-updates on windows it will always have to download the full package? That's not the end of the world - that's what happens on Mac anyway.

@develar
Copy link
Member

develar commented Sep 2, 2016

6.3.5 doesn't help you?

all this changes is that it will no longer produce delta updates. Is that correct?

yes

@arkakkar
Copy link

arkakkar commented Sep 20, 2017

Hi,
electron-builder : 19.27.7
I get this error which making a build for the windows platform, target Squirrel.
I have mentioned both remoteReleases and remoteToken fro my private repo

Error : Failed to sync URL as GitHub repo: Error: SecureChannelFailure (The authentication or decryption has failed.)

Could you help ?

screen shot 2017-09-20 at 9 22 58 pm

@arkakkar
Copy link

This is resolved. Issue was due to trust certificates with mono for fetching resource over https://.

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

Successfully merging a pull request may close this issue.

3 participants