Open lukasharing opened 3 years ago
Hmm, wondering if we should replace this with a check for a generic :///
style address so we can handle multiple wrappers and frameworks?
For the short term, I would suggest using a fork off the stable branch if you aren't already.
The path file:///
is incorrect in some devices, it should be file://
and ionic://
not ionic:///
The path
file:///
is incorrect in some devices, it should befile://
andionic://
notionic:///
Hmmm, that makes it problematic to be flexible 🤔 . Will need some thought
Thinking more on this, you could monkey patch the engine to make it work for your specific project to use your own logic.
Yes! We are using now a customized version of the engine 2021. We had to solve some bugs because we were using the version 2020 and these errors were not happening
What other bugs did you find? Are they ones that we need to fix or are the specific for your project?
What other bugs did you find? Are they ones that we need to fix or are the specific for your project?
Ah yes, that one we should get fixed/merged
Looking at phaser 3, they use the path with 2 backslashes rather than 3, but they do not accept ionic path neither
Thinking more on this, you could monkey patch the engine to make it work for your specific project to use your own logic.
Just to follow up on this, this is an example of a patch that can be made to a specific project: https://playcanvas.com/project/831967/overview/patch-http
Looking at phaser 3, they use the path with 2 backslashes rather than 3, but they do not accept ionic path neither
The issue I'm thinking about is that we can't add a list to every wrapper that exists 😅
Wondering if there was a better/more generic/customisable way of doing this
a: xhr.responseURL.startsWith('file:///') -> This should be a redundant case b: xhr.responseURL.startsWith('file://') || because if b is true, then (a || b) is also true and if a is true, b is always true. -> (a || b) <=> b
a: xhr.responseURL.startsWith('file:///') -> This should be a redundant case b: xhr.responseURL.startsWith('file://') || because if b is true, then (a || b) is also true and if a is true, b is always true. -> (a || b) <=> b
Sure, it was more to show how the patching would work in a project without needing to fork the engine
https://github.com/playcanvas/engine/blob/3071b54d832815d6a3012f5d97bf5cbaf6f7741e/src/net/http.js#L492
This should also accept ionic path: