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

NSNull objectForKeyedSubscript: unrecognized selector sent to instance #362

Open
ScabbersONE opened this issue Dec 23, 2021 · 12 comments
Open
Labels

Comments

@ScabbersONE
Copy link

This error happens when assigning the PushWooshAppCode value and GoogleProjectCode at the same time

@wfhm wfhm added the 65080 label Dec 23, 2021
@wfhm
Copy link
Member

wfhm commented Jan 12, 2022

@ScabbersONE Could you please provide a bit more detail on the issue? How exactly do you specify the app code and the FCM sender ID in your project?

@ScabbersONE
Copy link
Author

The error was happening when we removed the version number for pushwoosh on the end of the path to include pushwoosh in our project. We went back to using 8.2.3 and now we have our old issue where we can't generate the APK file "Couldn't install the Cordova plugin pushwoosh-cordova-plugin", but IPA generates fine. We use site properties to set the values for the codes, but the app doesn't crash with the above error now that we switched back to 8.2.3.

@wfhm
Copy link
Member

wfhm commented Jan 17, 2022

@ScabbersONE Could you please provide a bit more detail on the Android error? When exactly does this issue appear - does it happen when you add the plugin to the project, or does it specifically happen when you try generating an APK? Is it possible to provide the entire error message?

@ScabbersONE
Copy link
Author

We have talked with OutSystems support and they helped us to resolve the issue temporarily. They have said that Pushwoosh isn't supporting the use of it and firebase across different environments and that we should contact Pushwoosh to see if they can make Pushwoosh work similar to google-services. We have to create the folder "google-services" for each environment with the contents inside copied from the google-services folder for the respective environment located in our Resources tab.

@wfhm
Copy link
Member

wfhm commented Jan 18, 2022

@ScabbersONE the "Couldn't install the Cordova plugin pushwoosh-cordova-plugin" error means that something went wrong during the build process, or that there was an issue with one of the hooks. Could you please share your mobile apps log so we could investigate it further?

@ScabbersONE
Copy link
Author

OS Support said that it was an issue with the hook. Is there somewhere I can send the log to Pushwoosh more privately. As this is a security risk sending it through a public site.

@wfhm
Copy link
Member

wfhm commented Jan 20, 2022

@ScabbersONE sure, you can create a support ticket via this form:

https://help.pushwoosh.com/hc/en-us/requests/new

Just mention this issue in your original message so that our support team could forward the request to us.

@wfhm
Copy link
Member

wfhm commented Jan 25, 2022

@ScabbersONE could you please check that you have your google-services.json file added as per Outsystems integrations docs:

https://success.outsystems.com/Documentation/How-to_Guides/Integrations/How_to_Use_Push_Notifications_with_Pushwoosh

It should look like below:

image10

@ScabbersONE
Copy link
Author

I have done this in order to fix the issue. The problem is we have to create it for each environment specifically. We have a dev version of that file and a production version and based off of the environment it needs to change

@wfhm
Copy link
Member

wfhm commented Jan 26, 2022

@ScabbersONE the plugin itself can't work with multiple google-services files right now. I'm not sure if it can be handled on Outsystems side as well.

Anyway, may I ask you to describe what would be the expected plugin's behavior when you have to switch target environments?

@ScabbersONE
Copy link
Author

From OS Support --
What we are looking for from Pushwoosh is to implement a mechanism that would allow us to provide a different google-services file per environment where the application is being generated ( one google-services for Dev, another for QA, Prod, etc.)

The strategy that our supported Firebase plugin uses is to prefix the folder where you add the google-services file with the APP identifier used to generate the app. More information in the documentation below:
https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/Mobile_Plugins/Firebase_Plugins#Adding_and_using_a_Firebase_plugin [success.outsystems.com]

At compile time, instead of looking for the google-services folder like Pushwoosh does, it looks at a folder called .firebase ( e.g: com.sample.dev.Myapp.firebase).
The OutSystems developer can then add multiple files to the resources section of the module that will only be used when it matches the build with the same App Identifier ( the developer selects a different app identifier per environment).

The suggestion would be to Pushwoosh to implement a feature to try to read a file that follows the .pushwoosh schema ( e.g: com.sample.dev.Myapp.pushwoosh)
You can find our implementation on the link below:
https://github.com/OutSystems/cordova-outsystems-firebase-core/tree/main/hooks [github.com]

@wfhm
Copy link
Member

wfhm commented Jan 27, 2022

@ScabbersONE thanks for the suggestion, I have added the task to see if it is possible to our backlog. I will update this thread once there is any news.

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

No branches or pull requests

2 participants