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

ClassNotFoundException #49

Closed
felipesangiorge opened this issue May 25, 2021 · 18 comments
Closed

ClassNotFoundException #49

felipesangiorge opened this issue May 25, 2021 · 18 comments
Labels
bug Something isn't working device-specific

Comments

@felipesangiorge
Copy link

Hello Good evening,

I have noticed that one Samsung device A41 is having that error ->
I know that you had an open issue before for this to be corrected on 1.6.4 but was close without an answer, can you cross-check that I'm using 1.6.5 for the trimmer and still with the error.

05-25 14:01:01.278 1000 5164 7708 E Parcel : Class not found when unmarshalling: com.gowtham.library.utils.TrimVideoOptions
05-25 14:01:01.278 1000 5164 7708 E Parcel : java.lang.ClassNotFoundException: com.gowtham.library.utils.TrimVideoOptions
05-25 14:01:01.278 1000 5164 7708 E Parcel : at java.lang.Class.classForName(Native Method)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at java.lang.Class.forName(Class.java:454)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.os.Parcel.readParcelableCreator(Parcel.java:3350)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.os.Parcel.readParcelable(Parcel.java:3284)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.os.Parcel.readValue(Parcel.java:3186)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.os.Parcel.readArrayMapInternal(Parcel.java:3579)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.os.BaseBundle.unparcel(BaseBundle.java:236)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.os.BaseBundle.getString(BaseBundle.java:1196)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.content.Intent.getStringExtra(Intent.java:8889)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1128)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:894)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1710)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1560)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at com.android.server.wm.ActivityTaskManagerService.startActivity(ActivityTaskManagerService.java:1512)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.app.IActivityTaskManager$Stub.onTransact(IActivityTaskManager.java:1663)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.os.Binder.execTransactInternal(Binder.java:1195)
05-25 14:01:01.278 1000 5164 7708 E Parcel : at android.os.Binder.execTransact(Binder.java:1159)
05-25 14:01:01.278 1000 5164 7708 E Parcel : Caused by: java.lang.ClassNotFoundException: com.gowtham.library.utils.TrimVideoOptions
05-25 14:01:01.278 1000 5164 7708 E Parcel : ... 18 more
05-25 14:01:01.279 1000 5164 7708 W Bundle : Failed to parse Bundle, but defusing quietly
05-25 14:01:01.279 1000 5164 7708 W Bundle : android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.gowtham.library.utils.TrimVideoOptions
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.os.Parcel.readParcelableCreator(Parcel.java:3376)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.os.Parcel.readParcelable(Parcel.java:3284)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.os.Parcel.readValue(Parcel.java:3186)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.os.Parcel.readArrayMapInternal(Parcel.java:3579)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.os.BaseBundle.unparcel(BaseBundle.java:236)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.os.BaseBundle.getString(BaseBundle.java:1196)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.content.Intent.getStringExtra(Intent.java:8889)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1128)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:894)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1710)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1560)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at com.android.server.wm.ActivityTaskManagerService.startActivity(ActivityTaskManagerService.java:1512)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.app.IActivityTaskManager$Stub.onTransact(IActivityTaskManager.java:1663)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.os.Binder.execTransactInternal(Binder.java:1195)
05-25 14:01:01.279 1000 5164 7708 W Bundle : at android.os.Binder.execTransact(Binder.java:1159)

@a914-gowtham
Copy link
Owner

a914-gowtham commented May 25, 2021

@felipesangiorge I couldn't reproduce the issue on any of my devices. but, it seems error-related parcelable. I have tried this solution . Can you try this
com.github.a914-gowtham:Android-video-trimmer:2c479e7dd3 snapshot and let me know status

@felipesangiorge
Copy link
Author

@a914-gowtham perfect, I'm generating now the version with this to test then i let you know, thank you!

@felipesangiorge
Copy link
Author

@a914-gowtham Hello, unfortunately its having the same error ->

this is the Uid that is passed - > /com.gowtham.library.ui.ActVideoTrimmer (has extras)} from uid 10399

05-25 17:08:49.211 1000 5164 5957 E Parcel : Class not found when unmarshalling: com.gowtham.library.utils.TrimVideoOptions
05-25 17:08:49.211 1000 5164 5957 E Parcel : java.lang.ClassNotFoundException: com.gowtham.library.utils.TrimVideoOptions
05-25 17:08:49.211 1000 5164 5957 E Parcel : at java.lang.Class.classForName(Native Method)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at java.lang.Class.forName(Class.java:454)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.os.Parcel.readParcelableCreator(Parcel.java:3350)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.os.Parcel.readParcelable(Parcel.java:3284)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.os.Parcel.readValue(Parcel.java:3186)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.os.Parcel.readArrayMapInternal(Parcel.java:3579)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.os.BaseBundle.unparcel(BaseBundle.java:236)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.os.BaseBundle.getString(BaseBundle.java:1196)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.content.Intent.getStringExtra(Intent.java:8889)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1128)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:894)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1710)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1560)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at com.android.server.wm.ActivityTaskManagerService.startActivity(ActivityTaskManagerService.java:1512)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.app.IActivityTaskManager$Stub.onTransact(IActivityTaskManager.java:1663)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.os.Binder.execTransactInternal(Binder.java:1195)
05-25 17:08:49.211 1000 5164 5957 E Parcel : at android.os.Binder.execTransact(Binder.java:1159)
05-25 17:08:49.211 1000 5164 5957 E Parcel : Caused by: java.lang.ClassNotFoundException: com.gowtham.library.utils.TrimVideoOptions
05-25 17:08:49.211 1000 5164 5957 E Parcel : ... 18 more
05-25 17:08:49.211 1000 5164 5957 W Bundle : Failed to parse Bundle, but defusing quietly
05-25 17:08:49.211 1000 5164 5957 W Bundle : android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.gowtham.library.utils.TrimVideoOptions
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.os.Parcel.readParcelableCreator(Parcel.java:3376)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.os.Parcel.readParcelable(Parcel.java:3284)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.os.Parcel.readValue(Parcel.java:3186)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.os.Parcel.readArrayMapInternal(Parcel.java:3579)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.os.BaseBundle.initializeFromParcelLocked(BaseBundle.java:292)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.os.BaseBundle.unparcel(BaseBundle.java:236)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.os.BaseBundle.getString(BaseBundle.java:1196)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.content.Intent.getStringExtra(Intent.java:8889)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at com.android.server.wm.ActivityStarter.executeRequest(ActivityStarter.java:1128)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:894)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1710)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1560)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at com.android.server.wm.ActivityTaskManagerService.startActivity(ActivityTaskManagerService.java:1512)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.app.IActivityTaskManager$Stub.onTransact(IActivityTaskManager.java:1663)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.os.Binder.execTransactInternal(Binder.java:1195)
05-25 17:08:49.211 1000 5164 5957 W Bundle : at android.os.Binder.execTransact(Binder.java:1159)

@a914-gowtham
Copy link
Owner

a914-gowtham commented May 25, 2021

android.os.BadParcelableException: ClassNotFoundException when unmarshalling: com.gowtham.library.utils.TrimVideoOptions

It's still the same issue. let me any other solution

@a914-gowtham a914-gowtham added the bug Something isn't working label May 25, 2021
@a914-gowtham
Copy link
Owner

a914-gowtham commented May 25, 2021

@felipesangiorge Can you give it a try for these snapshots. I hope second one should work
implementation 'com.github.a914-gowtham:Android-video-trimmer:ea34fa0cf0'
implementation 'com.github.a914-gowtham:Android-video-trimmer:b6fe3a90f8'

@felipesangiorge
Copy link
Author

@a914-gowtham Sure will try both then give you a feedback

@felipesangiorge
Copy link
Author

@a914-gowtham Hello, I tested both, in the device still with the same error, but a point from this first snapshot, the others versions were crashing the app in that device, that first snapshot implementation 'com.github.a914-gowtham:Android-video-trimmer:ea34fa0cf0' the app does not crash, it's like relaunching the navigation, but still with the same class not found exception, I notice another thing too, the video preview takes a little bit of time to appear in that device, I don't know if that info can help in something.

@a914-gowtham
Copy link
Owner

@felipesangiorge Fine, now I have totally removed the parcelable implementation for trimVideoOption and compressOption class.
implementation 'com.github.a914-gowtham:Android-video-trimmer:83d2302d57'

That video preview time delay is a temporary fix of #40 and will be fixed.

@felipesangiorge
Copy link
Author

@a914-gowtham Hello sorry im not familiar with the ActivityResultLauncher how can i send my custom code for receive in the activity onActivityResult ?

@a914-gowtham
Copy link
Owner

a914-gowtham commented May 26, 2021

@felipesangiorge I forgot to mention it.

   //create a global variable
    ActivityResultLauncher<Intent> videoTrimResultLauncher = registerForActivityResult(
            new ActivityResultContracts.StartActivityForResult(),
            result -> {
                if (result.getResultCode() == Activity.RESULT_OK &&
                        result.getData() != null) {
                    Uri uri = Uri.parse(TrimVideo.getTrimmedVideoPath(result.getData()));
                    Log.d(TAG, "Trimmed path:: " + uri);
                   
                } else
                    LogMessage.v("videoTrimResultLauncher data is null");
            });
    TrimVideo.activity(data)
                    .setCompressOption(new CompressOption()) //pass empty constructor for default compress option
                    .start(this, videoTrimResultLauncher);

//for Kotlin

    val startForResult = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { 
    result: ActivityResult ->
        if (result.resultCode == Activity.RESULT_OK) {
            //handle data
        }
    }

TrimVideo.activity(data)
                    .setCompressOption(new CompressOption()) //pass empty constructor for default compress option
                    .start(this, videoTrimResultLauncher)

@hantash07
Copy link

@a914-gowtham You need to rename your dependency by putting all letters lowercase

Rename: implementation 'com.github.a914-gowtham:Android-video-trimmer:1.6.5'
into: implementation 'com.github.a914-gowtham:android-video-trimmer:1.6.5'

@a914-gowtham
Copy link
Owner

a914-gowtham commented May 27, 2021

@hantash07 I can do that by changing this repo name to lowercase. but, I'm afraid. it might make any issue related to jitpack

@hantash07
Copy link

@a914-gowtham I think this is the solution. You need to rename the repo.

@a914-gowtham
Copy link
Owner

@hantash07 okay, I will rename it once the fix is verified of this issue.

@a914-gowtham
Copy link
Owner

@felipesangiorge did you try that?

@felipesangiorge
Copy link
Author

@a914-gowtham Hello i sent the version for the person that have the crash to test, will receive the answer today yet then i keep you updated. Thanks

@felipesangiorge
Copy link
Author

@a914-gowtham Hello sorry for the late answer, i was little bit busy, so after check the log i could not find the error anymore, still crashing something after the trimmer but i dont think its related with the trimmer, its little bit hard because its not my device, but i think from your side that solution make effect.

@a914-gowtham
Copy link
Owner

@felipesangiorge That's okay. thanks for spending your time. you can use this latest version @hantash07
implementation 'com.github.a914-gowtham:android-video-trimmer:1.7.0'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working device-specific
Projects
None yet
Development

No branches or pull requests

3 participants