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

Realm 12.x + Electron package fails to load on macOS Catalina (10.15.x) #6210

Closed
jooy2 opened this issue Oct 23, 2023 · 6 comments
Closed

Realm 12.x + Electron package fails to load on macOS Catalina (10.15.x) #6210

jooy2 opened this issue Oct 23, 2023 · 6 comments

Comments

@jooy2
Copy link

jooy2 commented Oct 23, 2023

How frequently does the bug occur?

Always

Description

Hello, I recently experienced a crash in an app using realm 12.x and after checking the issue, I found that the realm module is not loading properly on macOS Catalina.

This issue has been occurring since realm 12.x and is working fine in 11.x.x.

After a successful build on macOS Sonoma and creating an executable package, I get the same error when I install and run that package on macOS Catalina. In other words, it doesn't seem to matter what OS you're building.

Also on macOS Sonoma and nearby versions, the issue does not occur, but on Catalina (10.15.x), an error occurs in the console window as shown below, and the Electron app may not load properly:

Uncaught Error: dlopen(/Users/test/Documents/sources/simple-example-realm-electron/node_modules/realm/generated/ts/realm.node, 1): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
  Referenced from: /Users/test/Documents/sources/simple-example-realm-electron/node_modules/realm/generated/ts/realm.node (which was built for Mac OS X 12.6)
  Expected in: /usr/lib/libc++.1.dylib

    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:2131)
    at Object.<anonymous> (node:internal/modules/cjs/loader:1356:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2131)
    at Module.load (node:internal/modules/cjs/loader:1126:32)
    at node:internal/modules/cjs/loader:967:12
    at Function.<anonymous> (node:electron/js2c/asar_bundle:2:13327)
    at Function._load (node:electron/js2c/renderer_init:2:4757)
    at Module.require (node:internal/modules/cjs/loader:1150:19)
    at require (node:internal/modules/cjs/helpers:121:18)
    at Object.<anonymous> (native-node.mjs:22:22)

image

Stacktrace & log output

No response

Can you reproduce the bug?

Always

Reproduction Steps

  1. Clone this repository:
https://github.com/jooy2/simple-example-realm-electron.git
  1. run command
$ cd simple-example-realm-electron
$ npm i
$ npm run start
  1. Check the issues shown in the developer console.

Version

12.2.1

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

macOS Catalina 10.15.7

Build environment

  • NodeJS 16.16.0 (or later)
  • Electron 27.0.2
  • macOS Catalina 10.15.7 or macOS Sonoma 14.0
  • Xcode 12.4 or Xcode 15.0.1

Cocoapods version

No response

@jooy2 jooy2 added the T-Bug label Oct 23, 2023
@jooy2 jooy2 changed the title realm 12.x + Electron package fails to load on macOS Catalina (10.15.x) Realm 12.x + Electron package fails to load on macOS Catalina (10.15.x) Oct 23, 2023
@jooy2
Copy link
Author

jooy2 commented Oct 23, 2023

Also i have a question: In an app implemented in 12.x, I want to update a patch that I downgraded to 11.x. Will it affect my DB files when I come back to 12.x later or use the patched version? I want to know if I can downgrade to 11.x and use it without any changes.

@kneth
Copy link
Contributor

kneth commented Oct 23, 2023

As the error message indicates, our binaries are built for more recent versions (MacOS 12.6 is Monterey and it is oldest Apple supported MacOS version). In order to build for Catalina, I believe we would have to use an unsupported version of Xcode.

can downgrade to 11.x and use it without any changes.

Version 12.0.0 did come with some minor breaking changes, so I would expect that you might have some minor adjustment to do.

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Oct 23, 2023
@jooy2
Copy link
Author

jooy2 commented Oct 24, 2023

Hello, Thank you for your quick response.
Our team has decided to downgrade to version 11 for the time being to provide more compatibility for our customers.

Fortunately, no code is affected by the breaking change, so it looks like the downgrade was successful without any code changes.

I'll be closing this issue soon, as it was intended based on your feedback.

Thank you!

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Oct 24, 2023
@kneth
Copy link
Contributor

kneth commented Oct 25, 2023

downgrade to version 11 for the time being

Sounds like a reasonable move. Please be aware that we will not provide bug fixes to version 11.

Fortunately, no code is affected by the breaking change

I am happy to hear. Version 12 is more breaking for us as it is a complete rewrite of the code (with new workflows for the team).

@sync-by-unito sync-by-unito bot added Waiting-For-Reporter Waiting for more information from the reporter before we can proceed and removed Needs-Attention Reporter has responded. Review comment. labels Oct 25, 2023
@jooy2
Copy link
Author

jooy2 commented Oct 25, 2023

I see, I understand about the support status of version 11.

We still have 6-8% of our total customers using our app on macOS Catalina and Big Sur, Unfortunately, they're using older devices, so it's hard to ask them to upgrade their macOS.

So I don't think it's an easy decision to upgrade right now, but we'll reconsider upgrading to 12 depending on how things go.

Thanks for the quick response!

@github-actions github-actions bot added Needs-Attention Reporter has responded. Review comment. and removed Waiting-For-Reporter Waiting for more information from the reporter before we can proceed labels Oct 25, 2023
@jooy2 jooy2 closed this as completed Oct 25, 2023
@kneth
Copy link
Contributor

kneth commented Oct 26, 2023

Don't hesitate to create new issues if you run into trouble when you decide to upgrade.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants