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

🐛 Bug Report: Expo React Native realtime URLSearchParams.set is not implemented #47

Closed
2 tasks done
anhtuank7c opened this issue Dec 31, 2022 · 6 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@anhtuank7c
Copy link

👟 Reproduction steps

I'm trying to subscribe to a document on the Expo client.

// expo project
import { Client } from 'appwrite';
const client = new Client().setProject(PROJECT_ID).setEndpoint(ENDPOINT_HERE);

useEffect(
    function subscribeToLikeAndCommentCount() {
      const unsubscribe = client.subscribe(
        `databases.DATABASE_ID_HERE.collections.COLLECTION_ID_HERE.documents.${videoId}`,
        (payload) => {
          console.log('payload', payload);
        }
      );
      return () => unsubscribe();
    },
    [videoId]
  );

I'm trying to install polyfill manually but got another issue with localstorage that doesn't exist on React Native.
facebook/react-native#23922 (comment)
Simulator Screen Shot - iPhone 14 Pro - 2022-12-31 at 17 47 04
Simulator Screen Shot - iPhone 14 Pro - 2022-12-31 at 17 42 51
Screenshot 2022-12-31 at 17 47 23

👍 Expected behavior

should print the console logs for the payload

👎 Actual Behavior

Error: URLSearchParams.set is not implemented

🎲 Appwrite version

Version 0.10.x

💻 Operating system

MacOS

🧱 Your Environment

System:
    OS: macOS 13.1
    CPU: (8) x64 Apple M1
    Memory: 37.08 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.7.0 - /usr/local/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.7.0/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v18.7.0/bin/npm
    Watchman: 2022.10.03.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/tuannguyen/.rvm/gems/ruby-2.7.5/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK:
      API Levels: 29, 31, 32, 33
      Build Tools: 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0
      System Images: android-32 | Google APIs ARM 64 v8a, android-33 | Google Play ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9123335
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.11 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.1.0 => 18.1.0 
    react-native: 0.70.5 => 0.70.5 
    expo: 47.0.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@anhtuank7c anhtuank7c added the bug Something isn't working label Dec 31, 2022
@stnguyen90
Copy link
Contributor

Is the local storage error the same as #29? Can you 👍 that issue and close this as a duplicate?

@anhtuank7c
Copy link
Author

@stnguyen90 If I fix the Polyfill issue, yes, it become the same as #29
But I think we should keep this issue open for the Polyfill issue.
What do you think?

@stnguyen90
Copy link
Contributor

But I think we should keep this issue open for the Polyfill issue.

From what I understand, React Native requires a polyfill. Is that right? What are you suggesting?

@stnguyen90 stnguyen90 self-assigned this Jan 10, 2023
@anhtuank7c
Copy link
Author

@stnguyen90 Yeah, I would suggest installing this one: https://github.com/expo/browser-polyfill for react native.

Can we somehow make local storage to be flexible to configs such as AsyncStorage or MMKV

@stnguyen90 stnguyen90 removed their assignment Mar 8, 2023
@stnguyen90
Copy link
Contributor

@anhtuank7c,

Yeah, I would suggest installing this one: https://github.com/expo/browser-polyfill for react native.

That seems out of the scope of Appwrite, then, right? As such, can this be closed?

Can we somehow make local storage to be flexible to configs such as AsyncStorage or MMKV

You might want to open a separate issue to request that.

@anhtuank7c
Copy link
Author

Thank you for update.
I've replaced Appwrite completely by PocketBase.
Issue no longer needed.

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

No branches or pull requests

2 participants