Conversation
ChatGPT reference-image uploads could fail with 'Page.fileChooserOpened not received within 5s' when the file input is present but no native chooser opens. Treat that timeout like the other setFileInput fallbacks and let the DOM DataTransfer path run instead of rethrowing.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Uploading a reference image in ChatGPT could fail with:
When the file input exists but no native chooser opens,
page.setFileInputthrows this timeout and the error was rethrown before the existing DOMDataTransferfallback could run, so the reference image was never attached.Change
Treat the
fileChooserOpenedtimeout like the other already-handledsetFileInputfailures (Unknown action,not supported,Not allowed,No element found) in both:uploadChatGPTImages(image/reference-image upload)uploadChatGPTProjectFiles(project file upload)This lets the adapter fall through to the DOM upload path that injects the file via
new DataTransfer()instead of surfacing the timeout as a hard failure.Test
Adds a regression test that rejects
setFileInputwith thefileChooserOpenedtimeout and asserts the DOMDataTransferfallback runs and the upload reports success.