Closed sakarimov closed 3 years ago
Hi @sakarimov , can you explain me a bit more the problem.
When does it fail? Which social network? Does the image never upload? Firefox and os version? Did you update your browser recently?
Thanks!
When does it fail? since friday 02 of October Which social network? Instagram Does the image never upload? yes, when the step goes to upload file it stucks and keep loading without uploading, then goes to caption typing step, whereas previously, after the "upload file" step, the file will be uploaded immediately and the program will go to the caption typing step image not uploaded but the typing goes on Firefox and os version? Firefox 81.0, Ubuntu 20.04 Did you update your browser recently? i dont think so, maybe not this is my last geckodriver.log
1601947341829 geckodriver INFO Listening on 127.0.0.1:51421 1601947342831 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-foreground" "-no-remote" "-profile" "/tmp/rust_mozprofilexpcGB8" (firefox:16259): IBUS-WARNING **: 08:22:32.030: Unable to connect to ibus: Could not connect: Connection refused console.error: SearchCache: "_readCacheFile: Error reading cache file:" (new Error("", "(unknown module)")) 1601947359652 Marionette INFO Listening on port 40341 1601947359782 Marionette WARN TLS certificate errors will be ignored for this session JavaScript error: resource://gre/actors/PictureInPictureChild.jsm, line 143: InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable JavaScript error: https://business.facebook.com/creatorstudio/?reference=visit_from_seo, line 46: TypeError: 'get width' called on an object that does not implement interface HTMLImageElement. IPDL protocol error: Handler returned error code!
!!! [Parent][DispatchAsyncMessage] Error: PLayerTransaction::Msg_ReleaseLayer Processing error: message was deserialized, but the handler returned false (indicating failure)
1601947856820 Marionette INFO Stopped listening on port 40341
Thanks for your reply.
I know about this problem.
Which social network? Instagram Does the image never upload? yes, when the step goes to upload file it stucks and keep loading without uploading
And a message of the problem is here:
JavaScript error: https://business.facebook.com/creatorstudio/?reference=visit_from_seo, line 46: TypeError: 'get width' called on an object that does not implement interface HTMLImageElement.
That is from your log file, you can see a similar output in the console of your browser.
I will try to explain a bit the issue.
I added an extension that implements different strategies to hide selenium. I took the extension from Instapy
One of that strategies is the Broken Image test. This code overwrites some properties of the HTMLImageElement. When you upload an image, a new image object is created and that overwritten properties are executed before the upload finish and you get the error because the image object was not set properly.
A quick solution is to comment from Line 33 until Line 49.
I will be thinking how to solve it. Disable it, it's an option, for this project I think is not necessary. At the moment Facebook don't implement a test like that one.
it works, thank u so much, it helps, I've been dizzy for a few days, and can't find an answer, hope u the best @asperduti
since friday i cannot upload any file with the script, i've never fail before, maybe it's because of the selenium, may you have the fix of this problem?