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

Cryptic MacOSX Error on fbs installer #154

Closed
alexrockhill opened this issue Oct 26, 2019 · 9 comments
Closed

Cryptic MacOSX Error on fbs installer #154

alexrockhill opened this issue Oct 26, 2019 · 9 comments

Comments

@alexrockhill
Copy link

@alexrockhill alexrockhill commented Oct 26, 2019

  • Your operating system(s)
    MacOS Catalina
  • Your Python version (Must be 3.5 or 3.6 because you followed the above instructions.)
    3.6.7
  • Your fbs version
    0.8.4
  • Your PyInstaller version
    3.5
  • Your PyQt5 / PySide2 version
    5.11.3
  • A copy of any error messages you are getting. Use ... to format them.
(sfvenv3) alexrockhill@Alexs-MacBook-Pro SlowFastQt % sudo fbs installer
waited 1 seconds for .DS_STORE to be created.
hdiutil: internet-enable: verb not recognized
Usage: hdiutil <verb> <options>
<verb> is one of the following:
help
attach
detach
eject
verify
create
compact
convert
burn
info
checksum
chpass
erasekeys
unflatten
flatten
imageinfo
isencrypted
makehybrid
mount
mountvol
unmount
plugins
resize
segment
pmap
udifderez
udifrez
Traceback (most recent call last):
  File "/Users/alexrockhill/software/anaconda3/envs/sfvenv3/bin/fbs", line 8, in <module>
    sys.exit(_main())
  File "/Users/alexrockhill/software/anaconda3/envs/sfvenv3/lib/python3.6/site-packages/fbs/__main__.py", line 17, in _main
    fbs.cmdline.main()
  File "/Users/alexrockhill/software/anaconda3/envs/sfvenv3/lib/python3.6/site-packages/fbs/cmdline.py", line 32, in main
    fn(*args)
  File "/Users/alexrockhill/software/anaconda3/envs/sfvenv3/lib/python3.6/site-packages/fbs/builtin_commands/__init__.py", line 183, in installer
    create_installer_mac()
  File "/Users/alexrockhill/software/anaconda3/envs/sfvenv3/lib/python3.6/site-packages/fbs/installer/mac/__init__.py", line 21, in create_installer_mac
    ], stdout=DEVNULL)
  File "/Users/alexrockhill/software/anaconda3/envs/sfvenv3/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/alexrockhill/software/anaconda3/envs/sfvenv3/lib/python3.6/site-packages/fbs/installer/mac/create-dmg/create-dmg', '--volname', 'SlowFast', '--app-drop-link', '170', '10', '--icon', 'SlowFast.app', '0', '10', '/Users/alexrockhill/education/UO/SwannLab/SlowFast/task versions/SlowFastQt/target/SlowFast.dmg', '/Users/alexrockhill/education/UO/SwannLab/SlowFast/task versions/SlowFastQt/target/SlowFast.app']' returned non-zero exit status 1.
  • A (minimal!) script that reproduces the problem you are experiencing.
    Not sure how to make a minimal script that produces the issue, this is just when happens when I run "fbs installer" with the above specs.
@alexandramartinez
Copy link

@alexandramartinez alexandramartinez commented Dec 24, 2019

I have the same issue

MacOS Catalina
Python 3.7
fbs 0.8.4
PyInstaller 3.5
PyQt5 5.14.0

@sneakypete81
Copy link

@sneakypete81 sneakypete81 commented Jan 19, 2020

This ("internet-enable") is a feature removed in MacOS Catalina. See electron-userland/electron-builder#4405 for more context.

@iwctwbai
Copy link

@iwctwbai iwctwbai commented Jan 29, 2020

I have the same issue.
how to fix it?
@sneakypete81
@alexrockhill
@alexandramartinez

@iwctwbai
Copy link

@iwctwbai iwctwbai commented Jan 29, 2020

It works

import platform
from fbs import path, SETTINGS
from os import replace, remove
from os.path import join, dirname, exists
from subprocess import check_call, DEVNULL

def create_installer_mac():
app_name = SETTINGS['app_name']
dest = path('target/${installer}')
dest_existed = exists(dest)
if dest_existed:
dest_bu = dest + '.bu'
replace(dest, dest_bu)
try:
pdata = [
join(dirname(file), 'create-dmg', 'create-dmg'),
'--volname', app_name,
'--app-drop-link', '170', '10',
'--icon', app_name + '.app', '0', '10',
dest,
path('${freeze_dir}')
]
if platform.system() == 'Darwin' and int(platform.platform()[7:][:2]) >= 19:
pdata.insert(1,'--no-internet-enable')
check_call(pdata, stdout=DEVNULL)
except BaseException:
if dest_existed:
replace(dest_bu, dest)
raise
else:
if dest_existed:
remove(dest_bu)
@iwctwbai
Copy link

@iwctwbai iwctwbai commented Jan 29, 2020

@mherrmann
Copy link
Owner

@mherrmann mherrmann commented Jan 29, 2020

Sorry, I can't read this. If you'd like to submit a Pull Request @iwctwbai I'd be happy to take a look at it. Thanks!

@gudwns1215
Copy link

@gudwns1215 gudwns1215 commented Feb 9, 2020

I think he added

if platform.system() == 'Darwin' and int(platform.platform()[7:][:2]) >= 19:
    pdata.insert(1,'--no-internet-enable')

in fbs/fbs/installer/mac/init.py
and pdata is original paramter to "check_call" function

@komodovaran
Copy link

@komodovaran komodovaran commented Feb 20, 2020

Properly formatted, the file fbs/installer/mac/__init__.py should contain:

import platform
from fbs import path, SETTINGS
from os import replace, remove
from os.path import join, dirname, exists
from subprocess import check_call, DEVNULL


def create_installer_mac():
    app_name = SETTINGS['app_name']
    dest = path('target/${installer}')
    dest_existed = exists(dest)
    if dest_existed:
        dest_bu = dest + '.bu'
        replace(dest, dest_bu)
    try:
        pdata = [
            join(dirname(__file__), 'create-dmg', 'create-dmg'),
            '--volname', app_name,
            '--app-drop-link', '170', '10',
            '--icon', app_name + '.app', '0', '10',
            dest,
            path('${freeze_dir}')
        ]
        if platform.system() == 'Darwin' and int(
            platform.platform()[7:][:2]) >= 19:
            pdata.insert(1, '--no-internet-enable')

            check_call(pdata, stdout = DEVNULL)
    except BaseException:
        if dest_existed:
            replace(dest_bu, dest)
        raise
    else:
        if dest_existed:
            remove(dest_bu)
@mherrmann
Copy link
Owner

@mherrmann mherrmann commented Feb 24, 2020

Thank you @komodovaran.

The code should use is_mac() from module fbs_runtime.platform instead of platform.system() == 'Darwin' and platform.mac_ver instead of platform.platform. I'd also remove the BaseException.

If someone creates a Pull Request with these changes, I'd be happy to merge them into fbs.

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

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.