question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autoupdater problem on mac if space in the name

See original GitHub issue
  • Version: 12.0.3
  • Target: Mac

I have my app packaged correctly and uploaded to an S3 bucket (something which I previously did with the Windows version), but the autoupdater doesn’t work on mac (it works fine on Windows though).

When running my app from the terminal so I can see the logging I see this:

App is ready
Checking for update
Found version 1.0.91 (url: https://s3-eu-west-1.amazonaws.com/*****/releases/MyApp-1.0.91-mac.zip)
Downloading update from https://s3-eu-west-1.amazonaws.com/*****/releases/MyApp-1.0.91-mac.zip
{ Error: Update check failed. The server sent an invalid JSON response. Try again later.
  preventDefault: [Function: preventDefault],
  sender:
   AutoUpdater {
     _events: { error: [Function], 'update-downloaded': [Function] },
     _eventsCount: 2 } }
Error: Error: Update check failed. The server sent an invalid JSON response. Try again later.

latest-mac.json contains

{
  "version": "1.0.91",
  "url": "https://s3-eu-west-1.amazonaws.com/*****/releases/MyApp-1.0.91-mac.zip"
}

What could be the problem?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ir-fuelcommented, Jan 31, 2017

Bingo!

Sometimes it helps to walk away from the computer in order to find it. My Product Name has spaces in it, therefore the generated JSON file also has spaces in the URL. I manually edited the JSON file on S3 and replaced the spaces with %20 and it works!

The yml file for my windows updates also contains the spaces in the file name, but it seems that isn’t a problem as I guess you build the URL yourself from the filename.

So I guess it would be a good idea to URLEncode the filename that is put in latest-mac.json before upload.

That was a productive day …

2reactions
ExPixelcommented, Jan 31, 2017

Looks like it should be const {autoUpdater} = require('electron-updater') or const autoUpdater = require('electron-updater').autoUpdater based on the wiki.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Auto Update - electron-builder
Simplified auto-update is supported on Windows if you use the default ... Mac, otherwise latest-mac.yml cannot be created, which causes autoUpdater error.
Read more >
Update macOS on Mac - Apple Support
Use Software Update to install updates and upgrades for macOS and its built-in apps, ... If you don't have enough storage space to...
Read more >
What Is Microsoft AutoUpdate on Mac and How to Delete It
The Microsoft AutoUpdate program stays operational even if you no longer have any Microsoft app installed on your Mac. That's a bit silly,...
Read more >
My Mac suddenly ran out of space - Ask Different
First of all, try disabling Time Machine, and erasing snapshots from your system. Open the terminal, and type the following:
Read more >
Troubleshoot Microsoft AutoUpdate in Microsoft 365 and ...
Help if you get an error using Microsoft AutoUpdate for Microsoft 365 or Office for Mac.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found