Open Bug 1540516 Opened 7 years ago Updated 3 years ago

ObjectURL invalid after changing url with pushState

Categories

(Core :: DOM: Core & HTML, defect, P3)

66 Branch
ARM
Android
defect

Tracking

()

Tracking Status
firefox66 --- wontfix
firefox67 --- affected
firefox68 --- affected

People

(Reporter: tur1n, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

(In the attached page:)
Select an image from file selector. Then Click the [Show] button.

Actual results:

Error message: "undefined" appears.

Expected results:

The selected image should have been displayed on the page.

Hello, thanks for your report.
I tried to reproduce the issue following your steps from the description but I wasn't able.
Builds:

  • Nightly 68.0a1 (2019-03-31);
  • Release 66.0.2.

Devices:

  • OnePlus 5T (Android 9);
  • Google Pixel (Android 9);
  • Nexus 9 (Android 7.1.1);
  • Nexus 6 (Android 6.0.1).

Can you provide us more information regarding your issue? (device/android affected, Firefox version, additional steps used or specific options)
Also, can you check if you allowed all permissions?
I'll wait for your updates, thanks.

Flags: needinfo?(tur1n)
OS: Unspecified → Android
Hardware: Unspecified → ARM

The steps still work for me. There are no additional steps required.

I used the the current release 66.0.2. The browser was a fresh install with default settings on both devices.

Devices:
Name: Nexus_5X_API_26 (Android 8.0) emulated via Android Studio.
Name: Samsung Galaxy J3 2016 SM-J330F (Android 7.0)

Flags: needinfo?(tur1n)
Priority: -- → P2

Hi,

I managed to reproduce the issue based on what described.

Environment
Device: Samsung Galaxy S9, Android(8.0.0)
Builds: Nightly 68.0a1(2019-04-17) and Beta (67.0b11)

I will mark the bug as NEW.

Thank you,
Diana Rus

Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: General → JavaScript Engine
Priority: P2 → --
Product: Firefox for Android → Core
Version: Firefox 66 → 66 Branch

Involves only DOM functionality, therefore moving into "DOM: Core & HTML" for further triaging.

Component: JavaScript Engine → DOM: Core & HTML

baku, can you take a look?

Flags: needinfo?(amarchesini)
Priority: -- → P3

This can be reproduced only on android, right? I don't have an android environment to test this issue.
Esawin, do you know if we do something special for window.history.pushState()? on android?

Flags: needinfo?(amarchesini) → needinfo?(esawin)

(In reply to Andrea Marchesini [:baku] from comment #6)

This can be reproduced only on android, right? I don't have an android environment to test this issue.
Esawin, do you know if we do something special for window.history.pushState()? on android?

I'm not aware of Fennec doing anything special for pushState, but it looks like the image blob is discarded during the push.
If you have any ideas you want to try or logs you want to see on Android, let me know.

Flags: needinfo?(esawin)

Hello,

I too came across this bug, with a slight variation. Posting the details here in case it may be of any help.
I'm building an app where the user is invited to upload an mp3 file.
This file is retrieved using the File API and retained in the app, a new history entry is created using pushState, then an ObjectURL is created from the file and used to create a new Audio(objectURL).
On Firefox for Android, an error event will be triggered, alongside the following MediaError:

MediaError { code: 4, message: "2152857618: Request failed" } MEDIA_ERR_SRC_NOT_SUPPORTED

I have put up a minimum reproducible test case: https://gist.github.com/ziir/aa8ae3af995df6a40de0ead650a81ac3

MediaError { code: 4, message: "Failed to open channel" } MEDIA_ERR_SRC_NOT_SUPPORTED 

I hotfixed this in my app by not using pushState here for Firefox Mobile users: https://github.com/soundcut/app/commit/d8c321c77f08a343604032ff90618c01dd734db0

Thanks,

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: