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

🔥iOS Xcode Log error "Unsupported value sent to buildTypeMap" #1788

Closed
6 of 31 tasks
noahtallen opened this issue Dec 24, 2018 · 3 comments
Closed
6 of 31 tasks

🔥iOS Xcode Log error "Unsupported value sent to buildTypeMap" #1788

noahtallen opened this issue Dec 24, 2018 · 3 comments
Assignees
Labels
help: good-first-issue Issues that are non-critical issues & well defined for first time contributors. help: ios Needs help implementing or reviewing a PR relating to iOS code. platform: ios
Milestone

Comments

@noahtallen
Copy link
Contributor

Issue

I ran into some build errors due to using the currently supported version of the iOS Firebase sdks (5.12?). The first issue was the google measurement API, and the second issue had to do with GRPC something or other. Both issues were resolved in recent updates to the iOS SDK, and since the build issues were.... painful... I decided to bump the SDK versions to 5.15 and hope that react-native-firebase would still support them correctly. As far as I can tell, everything in my app is working correctly, including creating documents and downloading collections, etc. However, while debugging a separate issue, I noticed the following error in my Xcode logs:

2018-12-23 20:01:45.909568-0500 zonder[60193:2894442] +[RNFirebaseFirestoreDocumentReference buildTypeMap:] [Line 328] RNFirebaseFirestore: Unsupported value sent to buildTypeMap - class type is NSNull

This error is repeated a few hundred times in a row, it seems. Not sure why. It seems to be an internal error while using the latest iOS Firebase SDK version, so I figured I'd report it as you guys prepare for version 5.2.0. ;)


Project Files

iOS

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
platform :ios, '9.0'

target 'zonder' do
  rn_path= '../node_modules/react-native'
 
  pod "yoga", :path => "../node_modules/react-native/ReactCommon/yoga"
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'DevSupport',
    'RCTWebSocket',
    'RCTImage'
    # Add any other subspecs you want to use in your project
  ]

  # Required by the Facebook SDK:
  pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
  pod 'FBSDKCoreKit', '4.38'
  pod 'FBSDKLoginKit', '4.38'
  pod 'FBSDKShareKit', '4.38'

  # Required by Firebase (see rnfirebase.io to add more Firebase features) 
  pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
  pod 'Firebase/Core', '~> 5.15.0'
  pod 'Firebase/Analytics', '~> 5.15.0'
  pod 'Firebase/Auth', '~> 5.15.0'
  pod 'Firebase/Firestore', '~> 5.15.0'
  pod 'Firebase/Messaging', '~> 5.15.0'
  pod 'Firebase/Storage', '~> 5.15.0'
  pod 'Firebase/DynamicLinks', '~> 5.15.0'
  # For Crashlytics:
  pod 'Fabric', '~> 1.7.11'
  pod 'Crashlytics', '~> 3.10.7'

  # For react-native-maps
  rn_maps_path = '../node_modules/react-native-maps'
  pod 'react-native-maps', path: rn_maps_path
  pod 'react-native-google-maps', path: rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'

  # For pictures & camera
  pod 'RNImageCropPicker', :path =>  '../node_modules/react-native-image-crop-picker'

  # Other random packages:
  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'

  pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'

  pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
  
  pod 'RNSVG', :path => '../node_modules/react-native-svg'

  pod 'RadarSDK', '~> 2.1.2'

  # For react navigation:
  pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'

  pod 'RNScreens', :path => '../node_modules/react-native-screens'

end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == 'react-native-google-maps'
      target.build_configurations.each do |config|
        config.build_settings['CLANG_ENABLE_MODULES'] = 'No'
      end
    end
    targets_to_ignore = %w(React yoga)
    if targets_to_ignore.include? target.name
        target.remove_from_project
      end
    if target.name == "React"
      target.remove_from_project
    end
  end
end

AppDelegate.m:

// N/A

Android

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->

Environment

  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
  • If known, the version of the platform are you experiencing the issue on:
    • iOS 12.1
  • Operating System:
    • MacOS, version: N/A
    • Windows, version: N/A
    • Other, please specify: N/A
  • Build Tools:
    • Xcode 10.1
  • React Native version:
    • 0.57.8
  • React Native Firebase library version:
    • 5.1.0
  • Firebase module(s) you're using that has the issue:
    • N/A
    • Authentication
    • Analytics
    • Cloud Firestore
    • Cloud Messaging (FCM)
    • Crashlytics
    • Dynamic Links
    • Functions Callable
    • Invites
    • Instance ID
    • Notifications
    • Performance Monitoring
    • Realtime Database
    • Remote Config
    • Storage
  • Are you using TypeScript?
    • No
    • Yes, version: N/A
  • Are you using Expo, e.g. ExpoKit?
    • No
    • Yes, I've not ejected
    • Yes, but I have ejected to ExpoKit
    • Yes, but I have ejected to vanilla React Native
    • Expo version: N/A

Think react-native-firebase is great? Please consider supporting the project with any of the below:

@Salakar
Copy link
Member

Salakar commented Dec 24, 2018

Thanks for the report, looks like they changed output of nulls in Firestore on iOS, was nil before, looks like it's now NSNull instances.

https://github.com/invertase/react-native-firebase/blob/master/ios/RNFirebase/firestore/RNFirebaseFirestoreDocumentReference.m#L235

Can see our convertion there, just needs a or is kind of class NSNull adding to support it.

If anyone can do a PR that'd be helpful, otherwise I'll look at this in the new year. It's none breaking right now so no rush.

@Salakar Salakar self-assigned this Dec 24, 2018
@Salakar Salakar added platform: ios Workflow: Needs Review Pending feedback or review from a maintainer. help: ios Needs help implementing or reviewing a PR relating to iOS code. help: good-first-issue Issues that are non-critical issues & well defined for first time contributors. labels Dec 24, 2018
@Salakar Salakar added this to the v6.0.0 milestone Dec 24, 2018
@noahtallen
Copy link
Contributor Author

Cool! I have a bit of time, so I'll put together a PR.

@Salakar
Copy link
Member

Salakar commented Dec 24, 2018

@noahtallen thanks for the PR 👌 I've gone ahead and merged it as it was all good 🔥

@mikehardy mikehardy removed the Workflow: Needs Review Pending feedback or review from a maintainer. label Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help: good-first-issue Issues that are non-critical issues & well defined for first time contributors. help: ios Needs help implementing or reviewing a PR relating to iOS code. platform: ios
Projects
None yet
Development

No branches or pull requests

3 participants