Invalid Configuration, new React Native version
Description:
New React Native version gave me the fallow warning:
warn Package react-native-onesignal has been ignored because it contains invalid configuration. Reason: Unknown option dependency.platforms.ios.sourceDir with value ""./ios"" was found. This is either a typing error or a user mistake. Fixing it will remove this message.
Environment
"react": "16.8.6",
"react-native": "0.60.3",
"react-native-onesignal": "^3.2.14",
Steps to Reproduce Issue:
- Install the OneSignal SDK using npm into your project
- Build the project
- Check for the logs
Same issue on 0.60.4
@blueromans temporary solution is manual linking, 0.60.4
@TolgaCagin Can you describe your way? Because i have try manual linking one more time.
@blueromans , just as usual, dont use react-native link & dont add to react-native-config.js , just manual add required line to settings , app/build.gradle MainApplication.java
@blueromans , just as usual, dont use react-native link & dont add to react-native-config.js , just manual add required line to settings , app/build.gradle MainApplication.java
That doesn't work either.
not working manual linking also. please any one have solution? this is serious issue help wanted
Howdy y'all, We will be releasing the newest version of the react-native SDK with fixes very soon. If you would like to test the changes now, simply change your react-native-onesignal in your package.json to point to this repository.
"react-native-onesignal":"geektimecoil/react-native-onesignal"
Would love to hear your feedback prior to the release. Cheers!
EDIT: PLEASE IGNORE THIS AS THE PLUGIN HAS NOW BEEN PUSHED TO NPM
after upadting library i faced issue at build time Could not find androidx.cardview:cardview:28.0.0. how to solve this??
Howdy y'all, We will be releasing the newest version of the react-native SDK with fixes very soon. If you would like to test the changes now, simply change your react-native-onesignal in your package.json to point to this repository.
"react-native-onesignal":"geektimecoil/react-native-onesignal"Would love to hear your feedback prior to the release. Cheers!
I'll see and get back to you, just a moment...
[UPDATE]
It didn't work, follow the log
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not find androidx.cardview:cardview:28.0.0.
Required by:
project :app > project :react-native-onesignal
> Could not find androidx.cardview:cardview:28.0.0.
Required by:
project :app > project :react-native-onesignal > com.onesignal:OneSignal:3.11.1
I am having this issue with react-native 0.60.4 and react-native-onesignal 3.3.0:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_RCTOneSignalExtensionService", referenced from:
objc-class-ref in NotificationService.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I worked around this issue with 0.60 and jetifying for now by doing this in app/build.gradle. Not sure if the new IAM stuff will work, but everything else seems ok.
implementation (project(':react-native-onesignal')) {
exclude group: 'com.android.support', module: 'cardview-v7'
}
implementation "androidx.cardview:cardview:1.0.0"
I worked around this issue with 0.60 and jetifying for now by doing this in app/build.gradle. Not sure if the new IAM stuff will work, but everything else seems ok.
implementation (project(':react-native-onesignal')) { exclude group: 'com.android.support', module: 'cardview-v7' } implementation "androidx.cardview:cardview:1.0.0"
Thanks! Doing that, I'm able to build ("react-native-onesignal": "^3.3.0").
Well, some observations...
On Android Studio, even having build with success I got some error (which I lost the log) but I had to do the following steps https://stackoverflow.com/a/49645970/1958882.
And, running through react native command react-native run-android, even having build success I also got
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- react-native-onesignal (to unlink run: "react-native unlink react-native-onesignal")
This is likely happening when upgrading React Native from below 0.60 to 0.60 or above. Going forward, you can unlink this dependency via "react-native unlink <dependency>" and it will be included in your app automatically. If a library isn't compatible with autolinking, disregard this message and notify the library maintainers.
Now I'm going to see if the push notification it's working...
[UPDATE]
Yep, push notification working!
Howdy y'all, Jetifier should be handling this automatically so it must not be working as intended. Please double check that you have followed the AndroidX migration instructions correctly
Howdy y'all, Jetifier should be handling this automatically so it must not be working as intended. Please double check that you have followed the AndroidX migration instructions correctly
Just to be clear,
I'm not migrating, but I'm starting a new project with the new react-native version, so AndroidX it's already setup.
android.useAndroidX=true
android.enableJetifier=true
Also, I have "postinstall": "npx jetify" always running.
@rochapablo I am not able to reproduce the "could not find androidx.cardview:cardview:28.0.0." error you are seeing. Can you provide a link to an example app and / or exact steps on reproducing it in a new issue?
Closing this issue as the original "warn Package react-native-onesignal has been ignored because it contains invalid configuration" is now fixed in the 3.3.0 version
If you are still see any issues after updating to 3.3.1 please create a new issue
@josh kasten Build is generated but can user register to one signal
Get Outlook for Androidhttps://aka.ms/ghei36
From: Josh Kasten [email protected] Sent: Friday, July 26, 2019 1:23:37 PM To: geektimecoil/react-native-onesignal [email protected] Cc: yogeshmoradiya121 [email protected]; Comment [email protected] Subject: Re: [geektimecoil/react-native-onesignal] Invalid Configuration, new React Native version (#805)
Closed #805https://github.com/geektimecoil/react-native-onesignal/issues/805.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/geektimecoil/react-native-onesignal/issues/805?email_source=notifications&email_token=AGURPRM6WSYUEA24ZQNPEN3QBKUQDA5CNFSM4IFE6DT2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSW3IO3Q#event-2511767406, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AGURPRNAHFNINRKIC3HJ54DQBKUQDANCNFSM4IFE6DTQ.