Skip to content

fix(android): move MimeTypeHelper log from error to debug#14460

Merged
hansemannn merged 1 commit into
mainfrom
androidMimeTypeLog
Jun 7, 2026
Merged

fix(android): move MimeTypeHelper log from error to debug#14460
hansemannn merged 1 commit into
mainfrom
androidMimeTypeLog

Conversation

@m1ga
Copy link
Copy Markdown
Contributor

@m1ga m1ga commented Jun 6, 2026

This code path gets hit frequently — for example when TiUIWebView (line 556) or TiResponseCache (line 419) calls getMimeType() on a URL whose path has no file extension. For every non-media file that reaches this code path (.js, .html, .png, images, etc.), setDataSource fails with 0x80000000 (MEDIA_ERROR_UNKNOWN) and the exception is logged at ERROR level.

That's why I'm moving it from ERROR to DEBUG so it won't show:

[ERROR] TiMimeTypeHelper: (main) [8,21907] setDataSource failed: status = 0x80000000
[ERROR] TiMimeTypeHelper: (main) [910,22817] setDataSource failed: status = 0x80000000
[ERROR] TiMimeTypeHelper: (main) [4,22821] setDataSource failed: status = 0x80000000
[ERROR] TiMimeTypeHelper: (main) [929,23750] setDataSource failed: status = 0x80000000
[ERROR] TiMimeTypeHelper: (main) [6,23756] setDataSource failed: status = 0x80000000 

if you download or create files with no ending as it still works.

Also adding the filename in the DEBUG log output so it's more useful.

@hansemannn hansemannn merged commit 885f413 into main Jun 7, 2026
7 checks passed
@hansemannn hansemannn deleted the androidMimeTypeLog branch June 7, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants