Closed mountiny closed 1 year ago
Job added to Upwork: https://www.upwork.com/jobs/~01ef230aad8534b92a
Triggered auto assignment to @twisterdotcom (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Triggered auto assignment to @twisterdotcom (External
), see https://stackoverflow.com/c/expensify/questions/8582 for more details.
Platforms
in OP are β
)Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External
)
Triggered auto assignment to @youssef-lr (External
), see https://stackoverflow.com/c/expensify/questions/7972 for more details.
I do not know how to reproduce this. @mountiny should I just trust this and make it external?
Oh wait, you already did. Okay, cool. I'm just a money man. π
@twisterdotcom External label has been applied. So we're good to go for now! :)
There is an app crash on mostly Sony devices related to urban airship.
The source of the problem is the putIfAbsent
method being called by the airship-mobile-framework
package.
The putIfAbsent
method was introduced in API Level 24 (Android 7) according to the documentation for java.util.Map
which is the base interface for maps. Trying to execute this on a device which is running a version of Android prior to 7 will result in this error. Thus, it makes sense that mostly Sony devices would be affected they haven't been diligent with major Android software updates. To verify, check the crash version being reported by Firebase.
Update: With the release of react-native-airship 15.2.3 which incorporates a fix for the problem, we can simply update package.json
with the new version number.
https://github.com/Expensify/App/blob/f54a8bd23018644d33114d1820f7e428f18c74f9/package.json#L67
We can either propose a change upstream to fix the issue. Changing the putIfAbsent
call to just put
should be adequate, since it's simply adding a key/value pair to a map, and if the key already exists, it will be overwritten. If it's absolutely necessary to check that the key exists, then we can use a combination of a !containsKey
or get(key) == null
check, and if the key doesn't exist or the key value is null, use the put
method to add the key/value pair to the map.
Alternatively, if the change cannot be applied upstream, maintain a fork of the airship-mobile-framework-proxy
package. This is a dependency for the react-native-airship
package, so a fork of this would have to be maintained as well.
https://github.com/urbanairship/react-native-airship/blob/main/android/build.gradle#L153
This would be more restrictive, but it's possible to set 24 as the minSdkVersion
for Android builds. This would prevent the app from being installed on devices running older versions of Android.
Asked if we support < Android 7, and if we should fix this issue https://expensify.slack.com/archives/C01GTK53T8Q/p1681782751971599
@akinwale Great find! Just to confirm, https://github.com/urbanairship/airship-mobile-framework-proxy is the repo where the bug is present?
The repo seems really active. It should be an easy fix.
@akinwale Great find! Just to confirm, https://github.com/urbanairship/airship-mobile-framework-proxy is the repo where the bug is present?
The repo seems really active. It should be an easy fix.
Yes. From line 32 of the EventEmitter class.
Thanks all. I shared this in our Airship support channel π€
Thanks for the report, ill get this resolved this week.
π£ @rlepinski! π£
Hey, it seems we donβt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Thanks, @rlepinski!!
Also sorry about our bot, please ignore π
Anything I need to do here regarding my proposal or do I wait until the airship code updates are completed / shipped?
@akinwale I am updating the code to remove putIfAbsent so it will be backwards compatible.
We cant just do a simple put since the code is tracking pending events that the plugin is unable to send yet (no listener). The list is needed since we might have multiple events of the same type. Your proposal of doing a check for null first would of worked, but since we are in Kotlin I used a handy getOrPut
method. Here is the change - https://github.com/urbanairship/airship-mobile-framework-proxy/pull/7/files
I will have a fix out today, so I think the path forward is to just wait for the release and update to resolve this issue.
Airship 15.2.3 release is out
Thanks for the speedy update Ryan!
Okay, @akinwale would you like to update your proposal to simply update the library?
Thanks for the speedy update Ryan!
Okay, @akinwale would you like to update your proposal to simply update the library?
Done.
π£ @akinwale You have been assigned to this job by @Julesssss! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
@mountiny Are there any exact steps to reproducing the crash? I'm assuming since Airship is meant for push messaging, it has to do with notifications, but I am not familiar enough with the system to be sure.
In this case we'll just have to monitor Firebase to ensure the exception stops occuring.
In this case we'll just have to monitor Firebase to ensure the exception stops occuring.
Thanks for the response.
I have applied to the Upwork job and the PR is ready for review.
What Jules said, thanks for handling and thanks for the fix!
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.5-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-05-03. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
@Julesssss @rushatgabhane @twisterdotcom Just checking in here regarding next steps and payment. Thanks.
Thanks for the bump @akinwale. Looks like this was unblocked for payment yesterday.
@twisterdotcom @rushatgabhane I checked off all the regression items because the regression occurred on an external library.
thanks :) @Julesssss
Sorry paid @akinwale. Offer sent to @rushatgabhane: https://www.upwork.com/nx/wm/pre-hire/c/8577561/offer/24422081
Are we good to close this @rushatgabhane?
Offer resent to the correct profile!
Paid!
Problem
coming from https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues/4bd625f86a63554f09e632520a29dfe5?time=last-seven-days&sessionEventKey=643856AC016C00010CA3E2063908E8E8_1800062918688317541
in version
1.2.99-6
we are running into this error on Android, on mostly Sony devices related to the urban airshipWhy is it important
Its causing app to crash
solution
Investigate and try to fix this crash
Upwork Automation - Do Not Edit