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

Parse SDK 4.3.1 is not working with React Native / Expo #2081

Closed
pdesign opened this issue Jan 27, 2024 · 9 comments
Closed

Parse SDK 4.3.1 is not working with React Native / Expo #2081

pdesign opened this issue Jan 27, 2024 · 9 comments
Labels
type:feature New feature or improvement of existing feature

Comments

@pdesign
Copy link

pdesign commented Jan 27, 2024

When i try to use Parse SDK with the examples shown in their documentation. But it keeps giving this error...

TypeError: Cannot convert undefined value to object, js engine: hermes

I think none of 4+ versions of SDK works... 3.4.0 version seems to work... but its pretty old...

also you can not import parse/react-native.js as shown in the example / documentation...

you need to place the full path, otherwise it does not seem to work too... You need to import like you see below

import Parse from './node_modules/parse/react-native.js';

Copy link

Thanks for opening this issue!

@mtrezza mtrezza added the type:feature New feature or improvement of existing feature label Jan 31, 2024
@chellay27
Copy link

Any update on this? Parse 3.4 is working.

@maciej-czekala
Copy link

I get the same error. Any update?

@mortenmo
Copy link
Contributor

I'm using 4.1 with React Native. I'm not using the react native version but the normal browser one. For React Native version just make sure you have the async storage installed (https://reactnative.dev/docs/asyncstorage). It is not a built-in feature of RN anymore. That might be the issue.

To use the browser version, you need a sync storage. I use MMKV (https://github.com/mrousavy/react-native-mmkv) and just built a small localstorage "polyfill" using it. Works great and I just import * as Parse from 'parse'; as you normally would.

@martinpfannemueller
Copy link

martinpfannemueller commented Apr 13, 2024

I tried to debug this problem including using different EventEmitter implementations. I could not get it to work. The problem is related to PR #1999. Locally I started from the current release branch, reverted the merge of this PR and got working LiveQuery connections again in my React Native project. I pushed my changes to https://github.com/martinpfannemueller/Parse-SDK-JS/tree/release.

The problem with this PR seems to be that the EventEmitters are not properly initialized when they are used. Hence, the registry objects inside the used emitter was undefined.

During my debugging I could see that this issue is also related to #2082.

@dplewis
Copy link
Member

dplewis commented Apr 13, 2024

@martinpfannemueller I opened a PR to address this issue. #2109
Can you try it out in your project and let me know if it works for you?

@martinpfannemueller
Copy link

@dplewis I just tested your updated code. The live query connection is working fine again for me. Thanks for the quick fix!

@dplewis
Copy link
Member

dplewis commented Apr 14, 2024

@martinpfannemueller No problem! Thank you for testing and debugging.

@dplewis
Copy link
Member

dplewis commented Apr 15, 2024

Completed by #2109

@dplewis dplewis closed this as completed Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or improvement of existing feature
Projects
None yet
Development

No branches or pull requests

7 participants