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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Got unknown argument class: String[] when calling Settings.setDataProcessingOptions (Android only) #255

Closed
oscb opened this issue May 17, 2022 · 3 comments 路 Fixed by #256
Closed
Labels

Comments

@oscb
Copy link
Contributor

oscb commented May 17, 2022

馃悰 Bug Report

When calling Settings.setDataProcessingOptions we get a crash on Android with the error Got unknown argument class: String[].

To Reproduce

  1. Cloned this repo
  2. Ran ./refresh-example.sh to setup the example app project
  3. Added this line in RNFBSDKExample/App.js right after initializeSDK (Line 40):
Settings.setDataProcessingOptions([], 0, 0);
  1. Start the project with yarn example:android

Expected Behavior

The function Settings.setDataProcessingOptions([], 0, 0); or Settings.setDataProcessingOptions(['LDU'], 0, 0); should not crash.

Code Example

I used the example in this repo with that line change, but happy to create a fork if needed.

Environment

System:
    OS: macOS 12.3.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 108.44 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 18.0.0 - /opt/homebrew/bin/node
    Yarn: 1.22.18 - /opt/homebrew/bin/yarn
    npm: 8.5.0 - ~/Projects/react-native-fbsdk-next/node_modules/.bin/npm
    Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK:
      API Levels: 28, 29, 30, 31, 32
      Build Tools: 28.0.3, 30.0.2, 31.0.0, 32.0.0
      System Images: android-32 | Google Play ARM 64 v8a
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7784292
    Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.15 - /Users/oscb/.jenv/shims/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2 
    react-native: ^0.67.2 => 0.67.2 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
@oscb
Copy link
Contributor Author

oscb commented May 18, 2022

I believe it is because these native methods are using primitive arrays instead of ReadableArray as per the RN docs.

Trying to check if that change fixes it

@mikehardy
Copy link
Collaborator

Yeah - I was just thinking the same - I read the issue from notifications in email before hitting the link to see your comments. Type mismatch. The PR that added that was more than 2 years ago and it's been sitting dormant since then. Clearly not used very often ;-)

@github-actions
Copy link

馃帀 This issue has been resolved in version 8.0.5 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants