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
Capacitor 4.0.0 crashing issue #25
Comments
can you create a pr please for the READE to cover this? |
It's my first pull request on github, i hope i've done everything correct..) |
I had an issue when trying this, need to check asap |
Hi! What was the issue? |
It was with cap 3 and my old setup, switched my dev machine and cap 4 is out, lets see that we can get that in asap |
I tried to follow the stacktrace and used diff --git a/node_modules/capacitor-plugin-playlist/android/build.gradle b/node_modules/capacitor-plugin-playlist/android/build.gradle
index d62c35d..dfdcb19 100644
--- a/node_modules/capacitor-plugin-playlist/android/build.gradle
+++ b/node_modules/capacitor-plugin-playlist/android/build.gradle
@@ -7,7 +7,7 @@ ext {
}
buildscript {
- ext.kotlin_version = '1.4.32'
+ ext.kotlin_version = '1.6.0'
repositories {
google()
jcenter()
@@ -69,6 +69,6 @@ dependencies {
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
// Playlist support
- implementation 'com.devbrackets.android:playlistcore:2.0.1'
-
+ implementation 'com.devbrackets.android:playlistcore:2.1.0'
+ implementation 'androidx.work:work-runtime-ktx:2.7.1'
}
diff --git a/node_modules/capacitor-plugin-playlist/android/src/main/java/org/dwbn/plugins/playlist/notification/PlaylistNotificationProvider.kt b/node_modules/capacitor-plugin-playlist/android/src/main/java/org/dwbn/plugins/playlist/notification/PlaylistNotificationProvider.kt
index eeab8b9..e428cda 100644
--- a/node_modules/capacitor-plugin-playlist/android/src/main/java/org/dwbn/plugins/playlist/notification/PlaylistNotificationProvider.kt
+++ b/node_modules/capacitor-plugin-playlist/android/src/main/java/org/dwbn/plugins/playlist/notification/PlaylistNotificationProvider.kt
@@ -3,6 +3,7 @@ package org.dwbn.plugins.playlist.notification
import android.annotation.SuppressLint
import android.app.PendingIntent
import android.app.PendingIntent.FLAG_UPDATE_CURRENT
+import android.app.PendingIntent.FLAG_IMMUTABLE
import android.content.Context
import android.content.Intent
import com.devbrackets.android.playlistcore.components.notification.DefaultPlaylistNotificationProvider
@@ -19,7 +20,7 @@ class PlaylistNotificationProvider(context: Context?) : DefaultPlaylistNotificat
intent!!.addFlags(
Intent.FLAG_ACTIVITY_REORDER_TO_FRONT or Intent.FLAG_ACTIVITY_SINGLE_TOP)
return PendingIntent.getActivity(this.context,
- 0, intent, FLAG_UPDATE_CURRENT
+ 0, intent, FLAG_UPDATE_CURRENT or FLAG_IMMUTABLE
)
}
}
\ No newline at end of file
|
@hinsxd Hi! Does it works for you or you had some issues still? I believe it's not the only problem, but currently new Capacitor 4 crashes because of lost FLAG_IMMUTABLE inside playlistcore lib. And playlistcore:2.1.0 solved this. |
I think it is working |
Is that cap3 backwards compatible? |
Could you create a pr?
PavelShvets-dev ***@***.***> schrieb am Mo., 20. Juni 2022,
15:12:
… @phiamo <https://github.com/phiamo> hi!
I know it's a little bit early, but current version crashing with new
Capacitor 4.0.0 (currently in beta version) on Android 12 (minSdk 31).
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or
FLAG_MUTABLE be specified when creating a PendingIntent.
The source of crash is PendingIntent inside
com.devbrackets.android:playlistcore:2.0.1
To fix crashing you need to upgrage at least two properies inside
build.gradle:
1.
Kotlin version
ext.kotlin_version = '1.6.0'
2.
PlaylistCore version
implementation 'com.devbrackets.android:playlistcore:2.1.0'
—
Reply to this email directly, view it on GitHub
<#25>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABSTO6QC7VSSBYJN2POUXLVQBU2BANCNFSM5ZI4HANQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I think #26 is already trying to address this issue |
@phiamo I am using Capacitor 3 and have started seeing the app not being able to start after updating (per Google requirements) the target API. This gives this error on app startup when the plugin tries to initialize Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent I have found the solution for me being the same as @hinsxd has written above. Updated kotlin version, playlistcore version + set the PendingItent Flag explicitely in PlaylistNotificationProvider. For me it is working on Capacitor 3. If the code from @hinsxd is then also applied, we should be good! Edit: |
Any update about this? |
It's already merges in another pull request. I am using this package for an active cap 4 project.
…________________________________
From: Marcel Alvarez ***@***.***>
Sent: Thursday, February 23, 2023 3:02:04 AM
To: phiamo/capacitor-plugin-playlist ***@***.***>
Cc: emilsaj ***@***.***>; Comment ***@***.***>
Subject: Re: [phiamo/capacitor-plugin-playlist] Capacitor 4.0.0 crashing issue (Issue #25)
Any update about this?
—
Reply to this email directly, view it on GitHub<#25 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AX65M6YCYB4SQIWCUXMLFETWY3AJZANCNFSM5ZI4HANQ>.
You are receiving this because you commented.Message ID: ***@***.***>
|
I'am unable to install with capacitor 4 due the npm dependency, you know a way to install and use the library with capacitor 4? Thanks
|
The peerdependency for capacitor in package.json is not updated. |
Hi and sorry,
I am currently not able to test changes and was afraid that it breaks bc .
I think you guys are using it in a current version. In finally found the
button and added @emilsaj as a collaborator.
Please @emilsaj feel free to merge and create releases I am very thankful
for all the contributions!
emilsaj ***@***.***> schrieb am Do., 23. Feb. 2023, 20:54:
… The peerdependency for capacitor in package.json is not updated.
@phiamo <https://github.com/phiamo> could you maybe make a new major
version for this plugin with capacitor ^4.y.z as Peer dependency instead of
capacitor 3? I have done it on my fork already for my own usage.
—
Reply to this email directly, view it on GitHub
<#25 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABSTO7UBOSY6XVIK5JTBODWY656BANCNFSM5ZI4HANQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@phiamo hi!
I know it's a little bit early, but current version crashing with new Capacitor 4.0.0 (currently in beta version) on Android 12 (minSdk 31).
The source of crash is PendingIntent inside
com.devbrackets.android:playlistcore:2.0.1
To fix crashing you need to upgrage at least two properies inside build.gradle:
Kotlin version
ext.kotlin_version = '1.6.0'
PlaylistCore version
implementation 'com.devbrackets.android:playlistcore:2.1.0'
I've already tested at my project - works fine
The text was updated successfully, but these errors were encountered: