Skip to content

MacOS Product Bundle is corrupt #1141

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

Closed
StevieDee123 opened this issue Jan 30, 2020 · 31 comments
Closed

MacOS Product Bundle is corrupt #1141

StevieDee123 opened this issue Jan 30, 2020 · 31 comments
Labels
domain: configuration Configuring Sloeber does not work as docummented importance: usability OS: mac status: fixed in 4.3.3 status: workaround documented A workaround has been confirmed to solve this issue.

Comments

@StevieDee123
Copy link

The current 64-bit MacOS bundle is corrupt. When I download V4.3.2_mac64.2019-10-07_08-26-30.tar.gz and extract it, the Sloeber executable shows the following dialog.

Screenshot 2020-01-30 17 30 38

I have tried this multiple times over the past few days.

@StevieDee123
Copy link
Author

I figured this out. The .tar.gz file didn't like being unpacked with the default Mac Archive Utility. It works fine when I do command line:
gunzip -c V4.3.2_mac64.2019-10-07_08-26-30.tar.gz | tar xopf -

Thanks. Sorry to bother you :)

@erdemuncuoglu
Copy link

You're welcome.

@jantje
Copy link
Member

jantje commented Jan 31, 2020

Would it be possible to make the tar mac archive compatible?
If not; should we not add this info to the installation instructions.
Or is the mac archive utility something non-standard?

@liebman
Copy link

liebman commented Jan 31, 2020

Note that even tar zxf V4.3.2_mac64.2019-10-07_08-26-30.tar.gz fails. only gunzip -c V4.3.2_mac64.2019-10-07_08-26-30.tar.gz | tar xf - works.

@StevieDee123
Copy link
Author

The default Mac archive utility is pretty standard. I've never seen this with other gzipped tarball files before. I'm not sure what is causing it. I would suggest at a minimum, add the command line details to the installation instructions.

@jantje
Copy link
Member

jantje commented Jan 31, 2020

I'm not sure how all this works but the code that does the tarring is here
https://github.com/Sloeber/arduino-eclipse-plugin/blob/master/io.sloeber.product/pom.xml#L38

and the build output for the tar is here

Installing org.eclipse.rse.core.feature.group 4.5.100.201907301734.
Installing org.eclipse.cdt.native.feature.group 9.9.0.201909051303.
Operation completed in 18915 ms.
[INFO] 
[INFO] --- tycho-p2-director-plugin:1.3.0:archive-products (archive-products) @ io.sloeber.product ---
[INFO] Building tar: /share/homes/admin/.jenkins/jobs/arduino eclipse plugin build/workspace/io.sloeber.product/target/products/sloeber-ide-sloeber_release-win32.win32.x86_64.tar.gz
[INFO] Building tar: /share/homes/admin/.jenkins/jobs/arduino eclipse plugin build/workspace/io.sloeber.product/target/products/sloeber-ide-sloeber_release-linux.gtk.x86_64.tar.gz
[INFO] Building tar: /share/homes/admin/.jenkins/jobs/arduino eclipse plugin build/workspace/io.sloeber.product/target/products/sloeber-ide-sloeber_release-macosx.cocoa.x86_64.tar.gz
[JENKINS] Archiving disabled
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building io.sloeber.updatesite 4.3.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------

There might be something "wrong" with the tar that is used on my build machine.

@jantje jantje reopened this Jan 31, 2020
@wimjongman
Copy link
Member

I'm not sure how all this works but the code that does the tarring is here
https://github.com/Sloeber/arduino-eclipse-plugin/blob/master/io.sloeber.product/pom.xml#L38

Why not use zip? tar.gz seems overly complicated

@jantje
Copy link
Member

jantje commented Feb 8, 2020

Why not use zip? tar.gz seems overly complicated

Zip for windows and mac? Also for linux?
No idea how to tackle his in a pom.

@liebman
Copy link

liebman commented Feb 8, 2020

Zip is available on linux as well. I'd even bet that on the common desktop distro's it may be installed by default most of the time.....

@wimjongman
Copy link
Member

wimjongman commented Feb 9, 2020 via email

jantje pushed a commit that referenced this issue Feb 16, 2020
@jantje jantje added domain: configuration Configuring Sloeber does not work as docummented importance: usability OS: mac status: fixed in 4.3.3 status: workaround documented A workaround has been confirmed to solve this issue. labels Mar 8, 2020
@jantje jantje closed this as completed Mar 8, 2020
@TrippyLighting
Copy link

Hmmm.... so the status says "fixed in nightly". But then following the nightlies one gets greeted with:
"If you ended up here you took a shortcut and failed. Go back to start. Start is here installAdvice.shtml"

So, in other words, the fix is not available to mere mortals and I have to resort to the stable and unpack this using the method @StevieDee123 posted above?
:/

@jantje
Copy link
Member

jantje commented Apr 19, 2020

@TrippyLighting Happy to see you again :-)
The nightly must be installed using the eclipse update site.
As I'm in the middle of making a release I could offer you a beta product download.

@jantje
Copy link
Member

jantje commented Apr 19, 2020

@TrippyLighting
Copy link

@jantje it seems that zipping it as suggested by @wimjongman did not resolve the issue.
Depending on how users have configured their mac setup, when they click on the green download button the download will automatically go into the downloads folder. There it is by default (Or so I believe. THis can be changed of course) automatically unzipped using the standard unarchive utility on macOS. Even with the pre-release you just did, that is still the case and users will receive the same "Sloeber is damaged ..." message.

I was able to unpack the stable version using the command line and gunzip. I've not tried that yet with the beta.

Now I have to figure out how to get it to work again with the newer Teensyduino releases. Wish me luck!

@TrippyLighting
Copy link

Aside from the unpacking issue, this was the easiest update to use teensy boards ever!

@jantje
Copy link
Member

jantje commented Apr 19, 2020

@TrippyLighting Am I correct to assume you succeeded to install the 4.3.3 beta but needed a special unpack command?

@TrippyLighting
Copy link

TrippyLighting commented Apr 19, 2020

@jantje nope ;-)
I was able to unpack the 4.3.2 stable with gunzip and get it to work with Teensy boards!
I was not able to get 4.3.3 to unpack into a usable version. I still receive the same "Sloeber is damaged ..." message. That is with the macOS Archive Utility.
No success unzipping this with gunzip. Maybe I haven't; tried hard enough ...

@jantje
Copy link
Member

jantje commented Apr 19, 2020

Disappointing to me :-(
I will need to look for a better solution.

@jantje jantje reopened this Apr 19, 2020
@jantje
Copy link
Member

jantje commented Apr 19, 2020

Can you check the checksum of the file you downloaded? This is what I get with the original file and the uploaded/downloaded version.
Extracts perfectly as well on my system.

Name: V4.3.3_mac64.2020-04-19_06-43-35.zip
Size: 185525081 bytes (176 MiB)
CRC64: 3571B005CB2856D9

@TrippyLighting
Copy link

How do I do that?
A simple:
cksum V4.3.3_mac64.2020-04-19_06-43-35.zip

returns this:
3305885082 185525081 V4.3.3_mac64.2020-04-19_06-43-35.zip

@jantje
Copy link
Member

jantje commented Apr 20, 2020

According to this article cksum calculates the CRC https://en.wikipedia.org/wiki/Cksum
The numbers do not match what my checksum tool calculates. Not even in length

Name: V4.3.3_mac64.2020-04-19_06-43-35.zip
Size: 185525081 bytes (176 MiB)
CRC32: 11B6DE88
CRC64: 3571B005CB2856D9
SHA256: 0AB4E3004E8DB1085E438AB92890AA40846DC03FE01E8E9263FB191D4199E26C
SHA1: 3BC54A7A74BA9D451F7327A27C9DC96748EDA106
BLAKE2sp: D26DFF159BFE633E55DDC16F66482C6CBD03ECE598F9799AE7F6528081E21CC0

IMHO this document states that cksum -o 3 V4.3.3_mac64.2020-04-19_06-43-35.zip should give you the CRC32 https://ss64.com/osx/cksum.html

@wimjongman
Copy link
Member

@wimjongman
Copy link
Member

There is also this thread.

MacDownApp/macdown#1106

@jantje
Copy link
Member

jantje commented Apr 21, 2020

@wimjongman thanks for the input. It confirms my thinking it is a mac security issue.
Seems that right clicking and ignoring the sercurity should do the trick though I have no idea where to right click.

@TrippyLighting
Copy link

@jantje
SHA1: 3bc54a7a74ba9d451f7327a27c9dc96748eda106
SHA256: 0ab4e3004e8db1085e438ab92890aa40846dc03fe01e8e9263fb191d4199e26c

Looks OK to me.

@TrippyLighting
Copy link

@jantje @wimjongman I agree that this appears to b a macOS security "thing". Following one of the links @wimjongman provided it is suggested to remove the quarantine flag from the manually downloaded .app-file.

So after unpacking the 4.33 zip file with the macOS native Archive Utility I did just that:

sudo xattr -r -d com.apple.quarantine Sloeber.app

Now it runs fine!

@jantje
Copy link
Member

jantje commented Apr 21, 2020

@TrippyLighting so this turns out to be another security invoked issue on mac 😠
If I understand correctly there are 3 ways of working around this problem
1.1)download with mac browser
1.2)unpacked the sloeber ide zip file with the macOS native Archive Utility
1.3)sudo xattr -r -d com.apple.quarantine Sloeber.app

2.1)download with mac browser
2.2)unzip with gunzip

3.1) download with wget (currently wget https://github.com/Sloeber/arduino-eclipse-plugin/releases/download/V4_3_3_beta/V4.3.3_mac64.2020-04-19_06-43-35.zip)
3.2) unpack with gunzip or the macOS native Archive Utility

I need to document "this mac feature". I think the first one is the most future proof as I suspect gunzip and wget will be brought into compliance to the security requirements.
Do you agree this is the best option?

@TrippyLighting
Copy link

@jantje #1 is probably the most common way mac users would download and unzip a file.
It would definitely help to add a few lines of explanation and the sudo xattr- .... to the installation documentation.
Not everyone will dig through issues on GitHub to find a solution ;-)

jantje pushed a commit that referenced this issue Apr 21, 2020
@jantje
Copy link
Member

jantje commented Apr 21, 2020

Web site should be updated soon :-) (that is if build succeeds)

@jantje jantje closed this as completed Apr 21, 2020
@tvand
Copy link

tvand commented Jul 20, 2020

The current bundle V4.3.3_mac64.2020-04-23_11-36-51.zip additionally required explicit specification of a -vm path in sloeber-ide.ini in my case (macOS 10.15.5)

@jantje
Copy link
Member

jantje commented Feb 8, 2024

Seems Sloeber 4.4.3 has install issues as well #1624.
As there are multiple Sloeber mac users here I post this message hoping someone can take a look.
Jantje

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain: configuration Configuring Sloeber does not work as docummented importance: usability OS: mac status: fixed in 4.3.3 status: workaround documented A workaround has been confirmed to solve this issue.
Projects
None yet
Development

No branches or pull requests

7 participants