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

Python 2.7 is removed from macOS in version 12.3+; Causes compiling to Fail #558

Closed
WrathofthePast opened this issue Jan 29, 2022 · 11 comments · Fixed by #598
Closed

Python 2.7 is removed from macOS in version 12.3+; Causes compiling to Fail #558

WrathofthePast opened this issue Jan 29, 2022 · 11 comments · Fixed by #598
Labels
bug Something isn't working

Comments

@WrathofthePast
Copy link
Collaborator

Apple states: "Python 2.7 was removed from macOS in this update. Developers should use Python 3 or an alternative language instead. (39795874)" Source

I have a newer version of python installed, but the ./releash.sh does not use it.

The manual build hasn't worked in a while due to an error with IOHook, so I have no way of compiling the app.

@WrathofthePast WrathofthePast added the bug Something isn't working label Jan 29, 2022
@WrathofthePast
Copy link
Collaborator Author

Upon further digging, the compiler finds and uses Python 3 I installed until building the package where the old alias for Python 2.7 at usr/bin/python causes an ENOENT error. macOS prevents write access for that folder, so Apple will have to remove the alias in an update. This is issue is likely to be self-resolving assuming Apple does delete said alias.

@WrathofthePast
Copy link
Collaborator Author

@dhobi, do you think merging #428, #434, #544, and/or #545 would resolve this issue? This issue can be resolved with editing ./releash.sh which is part of npm, one of the dependencies of razer-macos. It finds and uses the newer Python for most of the script already.

Apple still hasn't removed the leftover aliases even with the new beta released on Tuesday. I'm writing a bug report to Apple to get them to fix that.

@dhobi
Copy link
Collaborator

dhobi commented Feb 10, 2022

I can't (directly) see where python is used in our build process. Do you have a detailed error log / message which pinpoints to a missing Python 2.7 version?

@WrathofthePast
Copy link
Collaborator Author

I can't (directly) see where python is used in our build process. Do you have a detailed error log / message which pinpoints to a missing Python 2.7 version?

Here's the message saying it found Python 3.9.9 that I have installed and the error message:

gyp info find Python using Python version 3.9.9 found at "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
gyp info spawn /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
  ⨯ Exit code: ENOENT. spawn /usr/bin/python ENOENT  failedTask=build stackTrace=Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
    at /Users/BobWhite/razer-macos/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:404:5)
    at ChildProcess.errorhandler (node:child_process:416:5)
    at ChildProcess.emit (node:events:394:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
error Command failed with exit code 1.

Here's the unabridged log:

macbook-pro:razer-macos BobWhite$ sudo ./release.sh
Password:
yarn run v1.22.11
$ node-gyp clean
gyp info it worked if it ends with ok
gyp info using node-gyp@8.2.0
gyp info using node@16.6.1 | darwin | x64
gyp info ok 
✨  Done in 0.15s.
yarn install v1.22.11
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > @babel/preset-react@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@babel/preset-react > @babel/plugin-transform-react-display-name@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@babel/preset-react > @babel/plugin-transform-react-jsx@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@babel/preset-react > @babel/plugin-transform-react-jsx-development@7.12.12" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@babel/preset-react > @babel/plugin-transform-react-pure-annotations@7.12.1" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "@babel/preset-react > @babel/plugin-transform-react-jsx > @babel/plugin-syntax-jsx@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
warning " > babel-loader@8.2.2" has unmet peer dependency "@babel/core@^7.0.0".
[4/4] 🔨  Building fresh packages...
$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@8.2.0
gyp info using node@16.6.1 | darwin | x64
gyp info find Python using Python version 3.9.9 found at "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
gyp info spawn /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/BobWhite/razer-macos/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/BobWhite/razer-macos/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/BobWhite/razer-macos/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/BobWhite/Library/Caches/node-gyp/16.6.1/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/BobWhite/Library/Caches/node-gyp/16.6.1',
gyp info spawn args   '-Dnode_gyp_dir=/Users/BobWhite/razer-macos/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/BobWhite/Library/Caches/node-gyp/16.6.1/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/BobWhite/razer-macos',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/addon/src/driver/addon.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razeraccessory_driver.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razerchromacommon.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razercommon.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razerdevice.o
../librazermacos/src/lib/razerdevice.c:243:32: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
                IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &iter);
                                             ^~~~~~~~~~~~~~~~~~~~
                                             kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault
                  ^
../librazermacos/src/lib/razerdevice.c:389:42: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
            IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &iter);
                                         ^~~~~~~~~~~~~~~~~~~~
                                         kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault
                  ^
2 warnings generated.
../librazermacos/src/lib/razerdevice.c:243:32: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
                IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &iter);
                                             ^~~~~~~~~~~~~~~~~~~~
                                             kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault
                  ^
../librazermacos/src/lib/razerdevice.c:389:42: warning: 'kIOMasterPortDefault' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
            IOServiceGetMatchingServices(kIOMasterPortDefault, matchingDict, &iter);
                                         ^~~~~~~~~~~~~~~~~~~~
                                         kIOMainPortDefault
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:123:19: note: 'kIOMasterPortDefault' has been explicitly marked deprecated here
const mach_port_t kIOMasterPortDefault
                  ^
2 warnings generated.
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razeregpu_driver.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razerheadphone_driver.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razerkbd_driver.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razerkraken_driver.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razermouse_driver.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razermousedock_driver.o
  CC(target) Release/obj.target/addon/librazermacos/src/lib/razermousemat_driver.o
  SOLINK_MODULE(target) Release/addon.node
gyp info ok 
✨  Done in 45.34s.
yarn run v1.22.11
$ yarn compile && electron-builder
$ electron-webpack
10% [0] building 1/2 modules 1 active ...BobWhite/razer-macos/src/main/index.jsBrowserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Hash: 91e6ef3abd0b58c5bf7e0301c8ce670035d508c6
Version: webpack 4.46.0
Child
    Hash: 91e6ef3abd0b58c5bf7e
    Time: 3406ms
    Built at: 02/10/2022 1:23:36 PM
          Asset      Size  Chunks                   Chunk Names
     addon.node   446 KiB          [emitted]        
        main.js   101 KiB       0  [emitted]        main
    main.js.map  57.1 KiB       0  [emitted] [dev]  main
    Entrypoint main = main.js main.js.map
      [0] external "electron" 42 bytes {0} [built]
      [1] external "path" 42 bytes {0} [built]
      [3] multi ./src/main/index.js 28 bytes {0} [built]
      [4] ./src/main/index.js 160 bytes {0} [built]
      [5] ./build/Release/addon.node 217 bytes {0} [built]
      [8] ./src/devices sync \.json$/ 4.01 KiB {0} [built]
      [9] ./src/devices/abyssus.json 237 bytes {0} [optional] [built]
     [10] ./src/devices/abyssus_1800.json 322 bytes {0} [optional] [built]
     [11] ./src/devices/abyssus_2000.json 322 bytes {0} [optional] [built]
     [12] ./src/devices/abyssus_elite_dva_edition.json 504 bytes {0} [optional] [built]
     [13] ./src/devices/abyssus_essential.json 499 bytes {0} [optional] [built]
     [14] ./src/devices/abyssus_v2.json 630 bytes {0} [optional] [built]
    [151] external "electron-json-storage" 42 bytes {0} [built]
    [152] ./package.json 2.52 KiB {0} [built]
    [153] ./src/main/application.js + 41 modules 81.5 KiB {0} [built]
          | ./src/main/application.js 11.1 KiB [built]
          | ./src/main/razerapplication.js 1.63 KiB [built]
          | ./src/main/menu/menubuilder.js 4.83 KiB [built]
          | ./src/main/razerdevicemanager.js 6.4 KiB [built]
          | ./src/main/settingsmanager.js 1.12 KiB [built]
          | ./src/main/animation/animationcyclespectrum.js 841 bytes [built]
          | ./src/main/animation/animationcyclecustom.js 1.13 KiB [built]
          | ./src/main/statemanager.js 6.63 KiB [built]
          | ./src/main/menu/menubuilderdevice.js 12.4 KiB [built]
          | ./src/driver/index.js 90 bytes [built]
          | ./src/main/device/razerdevice.js 2.49 KiB [built]
          | ./src/main/device/razerdevicekeyboard.js 3.64 KiB [built]
          | ./src/main/feature/featureidentifier.js 711 bytes [built]
          | ./src/main/device/razerdevicemouse.js 6.55 KiB [built]
          | ./src/main/device/razerdevicemousedock.js 891 bytes [built]
          |     + 27 hidden modules
        + 139 hidden modules
Child
    Hash: 0301c8ce670035d508c6
    Time: 5272ms
    Built at: 02/10/2022 1:23:38 PM
                      Asset       Size  Chunks                   Chunk Names
                 index.html  279 bytes          [emitted]        
                renderer.js    293 KiB       0  [emitted]        renderer
    renderer.js.LICENSE.txt  790 bytes          [emitted]        
            renderer.js.map    325 KiB       0  [emitted] [dev]  renderer
                 styles.css   6.23 KiB       0  [emitted]        renderer
             styles.css.map    1.8 KiB       0  [emitted] [dev]  renderer
    Entrypoint renderer = styles.css renderer.js styles.css.map renderer.js.map
     [1] external "electron" 42 bytes {0} [built]
     [2] external "react-tabs" 42 bytes {0} [built]
     [3] external "react-select" 42 bytes {0} [built]
     [6] external "react-color" 42 bytes {0} [built]
     [7] external "react-slider" 42 bytes {0} [built]
    [11] multi ./src/renderer/index.jsx 28 bytes {0} [built]
    [16] ./src/renderer/react-tabs.css 39 bytes {0} [built]
    [31] ./src/renderer/index.css 39 bytes {0} [built]
    [32] ./src/renderer/index.jsx + 60 modules 328 KiB {0} [built]
         | ./src/renderer/index.jsx 237 bytes [built]
         | ./src/renderer/App.jsx 4.44 KiB [built]
         | ./src/renderer/views/viewdevicesettings.jsx 4.89 KiB [built]
         | ./src/renderer/views/viewcolorpicker.jsx 5.32 KiB [built]
         | ./src/renderer/views/viewstatesettings.jsx 25.7 KiB [built]
         | ./src/renderer/sections/sectionsettingbrightness.jsx 8.08 KiB [built]
         | ./src/renderer/sections/sectionsettingsensitivity.jsx 4.5 KiB [built]
         | ./src/renderer/sections/sectionsettingcolor.jsx 4.59 KiB [built]
         | ./src/renderer/sections/sectionproductheader.jsx 4.08 KiB [built]
         | ./src/renderer/sections/sectionsettingpollrate.jsx 8.77 KiB [built]
         | ./src/renderer/sections/sectionsettingblock.jsx 4.09 KiB [built]
         | ./src/main/feature/featureidentifier.js 711 bytes [built]
         |     + 49 hidden modules
        + 26 hidden modules
    Child HtmlWebpackCompiler:
         1 asset
        Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
        [0] ./node_modules/html-loader/dist/cjs.js?minimize=false!./dist/.renderer-index-template.html 274 bytes {0} [built]
    Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--6-1!src/renderer/index.css:
        Entrypoint mini-css-extract-plugin = *
        [0] ./node_modules/css-loader/dist/cjs.js??ref--6-1!./src/renderer/index.css 5.52 KiB {0} [built]
            + 1 hidden module
    Child mini-css-extract-plugin node_modules/css-loader/dist/cjs.js??ref--6-1!src/renderer/react-tabs.css:
        Entrypoint mini-css-extract-plugin = *
        [0] ./node_modules/css-loader/dist/cjs.js??ref--6-1!./src/renderer/react-tabs.css 1.47 KiB {0} [built]
            + 1 hidden module
  • electron-builder  version=22.13.1 os=21.4.0
  • loaded configuration  file=package.json ("build" field)
  • loaded parent configuration  file=/Users/BobWhite/razer-macos/node_modules/electron-webpack/out/electron-builder.js
  • author is missed in the package.json  appPackageFile=/Users/BobWhite/razer-macos/package.json
  • writing effective config  file=dist/builder-effective-config.yaml
  • executing node-gyp rebuild  platform=darwin arch=x64
  • packaging       platform=darwin arch=x64 electron=11.5.0 appOutDir=dist/mac-universal--x64
  • executing node-gyp rebuild  platform=darwin arch=arm64
  • packaging       platform=darwin arch=arm64 electron=11.5.0 appOutDir=dist/mac-universal--arm64
  • packaging       platform=darwin arch=universal electron=11.5.0 appOutDir=dist/mac-universal
  • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities=  1) 520AD08E81DC252F2B78D5A6CFEBA0B51459B91C "Apple Development: Robert White (XTG6TD8H49)" (CSSMERR_TP_NOT_TRUSTED)
  2) 7C7EAF9DB0F1C7F2FF2729D9B76BE5872D61A621 "Apple Development: Robert White (XTG6TD8H49)" (CSSMERR_TP_NOT_TRUSTED)
  3) 379A5F5C125893F9CBB3885F2B4FA7E58B0DF02C "Apple Development: dbslordbobbyis@gmail.com (5YX95H724P)" (CSSMERR_TP_NOT_TRUSTED)
  4) 545285822581D173D4FCC9386EE7AB7ED049EC6D "Apple Development: dbslordbobbyis@gmail.com (5YX95H724P)" (CSSMERR_TP_NOT_TRUSTED)
  5) 300477906810322A0846AE525ECF2C48F937DE42 "Server Fallback SSL Certificate" (CSSMERR_TP_NOT_TRUSTED)
     5 identities found
                                                Valid identities only
     0 valid identities found
Skipping notarization: Authentication environment variables for notarization are missing. Either APPLE_ID and APPLE_ID_PASSWORD, or API_KEY_ID and API_KEY_ISSUER_ID must be defined.
  • building        target=DMG arch=universal file=dist/Razer macOS-0.4.8-test10-universal.dmg
  ⨯ Exit code: ENOENT. spawn /usr/bin/python ENOENT  failedTask=build stackTrace=Error: Exit code: ENOENT. spawn /usr/bin/python ENOENT
    at /Users/BobWhite/razer-macos/node_modules/builder-util/src/util.ts:133:18
    at exithandler (node:child_process:404:5)
    at ChildProcess.errorhandler (node:child_process:416:5)
    at ChildProcess.emit (node:events:394:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12)
    at onErrorNT (node:internal/child_process:480:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@dhobi
Copy link
Collaborator

dhobi commented Feb 10, 2022

Thanks for the log.

Seems like electron-builder -> dmg-builder is failing here.
The issue is reported here and already closed: electron-userland/electron-builder#6606

I guess all we have to do is to bump our electron-builder version to the latest version which will support both, python2 and python3.

Can you try this locally? I'm currently macless... ☹️

@WrathofthePast
Copy link
Collaborator Author

Thanks for the log.

Seems like electron-builder -> dmg-builder is failing here. The issue is reported here and already closed: electron-userland/electron-builder#6606

I guess all we have to do is to bump our electron-builder version to the latest version which will support both, python2 and python3.

Can you try this locally? I'm currently macless... ☹️

I updated the version of electron-builder in package.json, but I'm getting a new error now:

 • packaging       platform=darwin arch=universal electron=11.5.0 appOutDir=dist/mac-universal
  ⨯ Can't reconcile two non-macho files build/Makefile  failedTask=build stackTrace=Error: Can't reconcile two non-macho files build/Makefile
    at Object.exports.mergeASARs (/Users/BobWhite/razer-macos/node_modules/app-builder-lib/node_modules/@electron/universal/src/asar-utils.ts:151:13)
    at exports.makeUniversalApp (/Users/BobWhite/razer-macos/node_modules/app-builder-lib/node_modules/@electron/universal/src/index.ts:200:13)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at MacPackager.doPack (/Users/BobWhite/razer-macos/node_modules/app-builder-lib/src/macPackager.ts:125:9)
    at MacPackager.pack (/Users/BobWhite/razer-macos/node_modules/app-builder-lib/src/macPackager.ts:179:7)
    at Packager.doBuild (/Users/BobWhite/razer-macos/node_modules/app-builder-lib/src/packager.ts:441:9)
    at Object.executeFinally (/Users/BobWhite/razer-macos/node_modules/builder-util/src/promise.ts:12:14)
    at Packager._build (/Users/BobWhite/razer-macos/node_modules/app-builder-lib/src/packager.ts:376:31)
    at Packager.build (/Users/BobWhite/razer-macos/node_modules/app-builder-lib/src/packager.ts:337:12)
    at Object.executeFinally (/Users/BobWhite/razer-macos/node_modules/builder-util/src/promise.ts:12:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
./dist/mac-universal/Razer macOS.app: No such file or directory

Does something need to be updated in yarn.lock or another file? Do other electron dependencies need to be updated? There's a lot of deprecation warnings (see the prior long) and electron v11 has been unsupported for a while now.

@dhobi
Copy link
Collaborator

dhobi commented Feb 11, 2022

Hmm from my (very little) understanding what's going on I'd say that electron/universal is not happy when trying to merge (reconcile) the two arm64 and x64 binaries into one universal dmg.

Could you update the "@electron/universal" dependency to the latest version and try again?

(To be sure you really have all the given deps installed in package.json you could delete the package.lock and the node_modules folder and install them again)

@WrathofthePast
Copy link
Collaborator Author

Hmm from my (very little) understanding what's going on I'd say that electron/universal is not happy when trying to merge (reconcile) the two arm64 and x64 binaries into one universal dmg.

Could you update the "@electron/universal" dependency to the latest version and try again?

(To be sure you really have all the given deps installed in package.json you could delete the package.lock and the node_modules folder and install them again)

I updated @electron/universal and made sure to delete the node_modules folder each time I bumped a dependency. However, for "package.lock," there isn't any file named that, but there are three files named "package-lock.json" in the iohook folder. Did you want me to delete those files?

I also updated electron-builder-notarize and node-forge dependencies but that was also to no avail. Do you think electron needs to be updated? Version 11 has been unsupported for a while now.

@1kc
Copy link
Owner

1kc commented Feb 12, 2022

I just remember doing a blanket update for everything in the past and that broke the React frontend, so we do have to be selective. I will have a look into it also.

@WrathofthePast
Copy link
Collaborator Author

WrathofthePast commented Feb 14, 2022

I just remember doing a blanket update for everything in the past and that broke the React frontend, so we do have to be selective. I will have a look into it also.

I think I figured it out:

  1. Update @babel/preset-react from v7.9.4 to v7.14.5
  2. @dhobi, was right: @electron/universal current version is required for the electron-builder update
  3. Update electron-builder-notarize from v1.2.0 to v1.4.0
  4. Even with the Item 3, running yarn check returned 1 error:
    error "electron-builder-notarize#electron-builder@>= 20.44.4" doesn't satisfy found match of "electron-builder@23.0.0-alpha.3"
    It appears that electron-builder v23.0.0 needs to be a full release instead of an alpha. In other words, it's waiting game to get, hopefully, the last piece of this issue solved.

Items 1-3 allowed me to package the x64 & arm64 apps, but it still failed to build and notarize the universal app due to the error in Item 4.

@WrathofthePast
Copy link
Collaborator Author

I think I figured it out:

  1. Update @babel/preset-react from v7.9.4 to v7.14.5
  2. @dhobi, was right: @electron/universal current version is required for the electron-builder update
  3. Update electron-builder-notarize from v1.2.0 to v1.4.0
  4. Even with the Item 3, running yarn check returned 1 error:
    error "electron-builder-notarize#electron-builder@>= 20.44.4" doesn't satisfy found match of "electron-builder@23.0.0-alpha.3"
    It appears that electron-builder v23.0.0 needs to be a full release instead of an alpha. In other words, it's waiting game to get, hopefully, the last piece of this issue solved.

Items 1-3 allowed me to package the x64 & arm64 apps, but it still failed to build and notarize the universal app due to the error in Item 4.

@dhobi, electron-builder v23.0.0 is now a full release, which fixed the error yarn check was reporting that would've caused notarizing to fail. However, the universal app packaging error is unchanged as it never got to the notarizing step.

I just remember doing a blanket update for everything in the past and that broke the React frontend, so we do have to be selective. I will have a look into it also.

@1kc, I tried updating every dependency and nothing broke the react frontend. However, updating webpack to v5.x.x or mini-css-extract-plugin to any newer version breaks electron-webpack as it's outdated from a lack of maintainers. There are no newer versions for websocket-extensions, native-ext-loader, or tinycolor2. iohook does not support electron v15.x.x and newer, so I only tried up to v14.x.x.

Any ideas? My thought is that this has something to do with electron-webpack after days of trial and error. The repo recommends moving to vite-electron-builder as a replacement. On the upside, it includes electron-builder and allows for the latest versions of electron.

WrathofthePast added a commit to WrathofthePast/razer-macos that referenced this issue Feb 24, 2022
Adds support for both bluetooth and receiver connections

Accompanying PR: 1kc/librazermacos#29

Due 1kc#558, I'm currently unable to provide a test build; however, anyone who wishes to test can build it.
@1kc 1kc closed this as completed in #598 Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants