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

[Bug]: Android release mode: response null values #18

Open
devz097 opened this issue Mar 20, 2024 · 4 comments
Open

[Bug]: Android release mode: response null values #18

devz097 opened this issue Mar 20, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@devz097
Copy link

devz097 commented Mar 20, 2024

Version

1.2.1

Environment that reproduces the issue

Google pixel6a Android 14
Android studio emulator,
Vivo android 13
Flutter 3.16.7 ~ 3.19.1

Is it reproducible in the example application?

Yes

Reproduction steps

After implement the package, I tried to test it as release mode.
But response's property has null always.

Expected result

In the response,
Current release mode sends all null
"assets": {hls: null, iframe: null, player: null, thumbnail: null, mp4: null}

I want to get the correct value for each parameter of assets.
"assets": {
"hls": "https://vod.api.video/vod/vi7mdtR2wbth2lpgIazD74Ik/hls/manifest.m3u8",
"iframe": "<iframe src="https://embed.api.video/vod/vi7mdtR2wbth2lpgIazD74Ik\" width="100%" height="100%" frameborder="0" scrolling="no" allowfullscreen="true"></iframe>",
"player": "https://embed.api.video/vod/vi7mdtR2wbth2lpgIazD74Ik",
"thumbnail": "https://vod.api.video/vod/vi7mdtR2wbth2lpgIazD74Ik/thumbnail.jpg",
"mp4": "https://vod.api.video/vod/vi7mdtR2wbth2lpgIazD74Ik/mp4/source.mp4"
},

Actual result

Greetings API.video team.

https://pub.dev/packages/video_uploader
It works in debug mode as well.
But in the release mode, it works but response of uploading are null for each paramter.

> I/flutter (14583): [video uploading result=====:, {videoId: vi2zZOODhfOFMaeY97eSkBfg, createdAt: 2024-03-20T20:42:24.000Z, title: REC6169411350185702043.mp4, description: , publishedAt: 2024-03-20T20:42:24Z, updatedAt: 2024-03-20T20:42:24.000Z, tags: [], metadata: [], source: Instance of 'VideoSource', assets: Instance of 'VideoAssets', playerId: null, _public: null, panoramic: false, mp4Support: true}]
> I/flutter (14583): [video uploading result=====:toJson, {hls: null, iframe: null, player: null, thumbnail: null, mp4: null}]
> I/flutter (14583): [video uploading result=====mp4:, null]
> I/flutter (14583): [video uploading result=====thumbnail:, null]

Please help me what I do to receive correct response.
Best regards.
Thank you.

Additional context

Video ID: vi7mdtR2wbth2lpgIazD74Ik

Relevant logs output

There is no error.
@devz097 devz097 added the bug Something isn't working label Mar 20, 2024
@ThibaultBee
Copy link
Member

Hi,
Thanks for reporting this bug.
I can't reproduce exactly the same problem but there is indeed something odd with the obfuscation that we must fix.
What upload method do you use?

As a workaround,you can set minifyEnabled to false in your application build.gradle.

@devz097
Copy link
Author

devz097 commented Mar 21, 2024

Thanks for your response.
I am using this function to upload video.

await ApiVideoUploader.uploadWithUploadToken(
            Config.uploadToken, uploadFile.path,     
        )

I tried to build apk after setting minifyEnabled false.
But failed to build by the setting.

@ThibaultBee
Copy link
Member

hmm, I still have no clue on how to reproduce the exact bug.
Have you tried to reproduce it in the example?

I added proguard rules in the native dependency but I want to make sure it fixes your issue before releasing it.

@ThibaultBee
Copy link
Member

I don't think the issue on proguard is the issue you are looking at.
Anyway, I fixed in in the main branch. (and I also added a toString() for the Video object).

On my side, VideoAssets always returns correct value.
Is there a way I can reproduce your issue on my side? (like in the example, in a test application)?

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

No branches or pull requests

2 participants