New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to load HTTP resource in live URL #23012
Comments
Can you please share here, how you are using angular http service. It seems like you are facing issue due to some missing server-side configurations, something which is not related to angular. |
@jainanuj0812 follow my uploaded application. In that application, I just set demo images three is in HTTPS and same three in HTTP when you set a refresh page https images are load but not HTTP images. You can check in console and Network tab of developer option. i set application in this server : https://ghostly-baud.000webhostapp.com/ |
@akilmakda, You can't make a request to HTTP from the HTTPS based origin. https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy |
This seems to be caused by the fact that, while "passive mixed content" (like images) only produces a warning without a ServiceWorker, fetching it via a ServiceWorker results in an error. This applies to ServiceWorkers in general and is not specific to Angular's implementation. As fas as I understand, the fact that fetching from within the ServiceWorker behaves differently than fetching without a ServiceWorker is a limitation of ServiceWorkers (see relevant discussions here, here, and here). One option for While fixing #20404 we can make sure that it is possible to specify URL patterns that won't be handled by the ServiceWorker, which would provide a work-around for your usecase (i.e. you could config the SW to ignore WDYT, @alxhub? |
It turns out that the fix for #20404 |
So, the only fix/work-around I can think of is ignoring |
@gkalpak 'ignoredUrlPatterns' not work for HTTP response. can you give any e.g how to ignore HTTP response. or any other way to ignore HTTP API response. |
@akilmakda, I fixed my previous comment. I meant that #20404 cannot fix your usecase. |
For future reference: |
Although [passive mixed content][1] (like images) only produces a warning without a ServiceWorker, fetching it via a ServiceWorker results in an error. See angular#23012 (comment) for more details. This commit makes the ServiceWorker ignore such requests and let them be handled by the browser directly to avoid breaking apps that would work without the ServiceWorker. [1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content Fixes angular#23012
Although [passive mixed content][1] (like images) only produces a warning without a ServiceWorker, fetching it via a ServiceWorker results in an error. See angular#23012 (comment) for more details. This commit makes the ServiceWorker ignore such requests and let them be handled by the browser directly to avoid breaking apps that would work without the ServiceWorker. [1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content Fixes angular#23012
Although [passive mixed content][1] requests (like images) only produce a warning without a ServiceWorker, fetching it via a ServiceWorker results in an error. See angular#23012 (comment) for more details. This commit makes the ServiceWorker ignore such requests and let them be handled by the browser directly to avoid breaking apps that would work without the ServiceWorker. [1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content Fixes angular#23012
Although [passive mixed content][1] requests (like images) only produce a warning without a ServiceWorker, fetching it via a ServiceWorker results in an error. See angular#23012 (comment) for more details. This commit makes the ServiceWorker ignore such requests and let them be handled by the browser directly to avoid breaking apps that would work without the ServiceWorker. [1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content Fixes angular#23012
Although [passive mixed content][1] requests (like images) only produce a warning without a ServiceWorker, fetching it via a ServiceWorker results in an error. See angular#23012 (comment) for more details. This commit makes the ServiceWorker ignore such requests and let them be handled by the browser directly to avoid breaking apps that would work without the ServiceWorker. [1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content Fixes angular#23012
@gkalpak when this feature roll-out? |
It has to be reviewed and merged first 😁 |
@gkalpak can you give me a timeline when you release this? So I will provide to my boss. |
No estimate, sorry. There other higher priority stuff to sort out first (for the upcoming 7.0 release). |
Although [passive mixed content][1] requests (like images) only produce a warning without a ServiceWorker, fetching it via a ServiceWorker results in an error. See angular#23012 (comment) for more details. This commit makes the ServiceWorker ignore such requests and let them be handled by the browser directly to avoid breaking apps that would work without the ServiceWorker. [1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content Fixes angular#23012
@gkalpak any update on this? |
@gkalpak any update? |
I have a fix in #25994, but it is pending approval... |
@gkalpak +1 here |
@gkalpak It seems like this issue is faced by many of user but got stuck in approval process. I am also waiting for this fix for almost 6+ months. |
@shabbir-dhangot, hopefully this week 🎉 (based on #25994 (comment)) |
Although [passive mixed content][1] requests (like images) only produce a warning without a ServiceWorker, fetching it via a ServiceWorker results in an error. See angular#23012 (comment) for more details. This commit makes the ServiceWorker ignore such requests and let them be handled by the browser directly to avoid breaking apps that would work without the ServiceWorker. [1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content Fixes angular#23012
Although [passive mixed content][1] requests (like images) only produce a warning without a ServiceWorker, fetching it via a ServiceWorker results in an error. See #23012 (comment) for more details. This commit makes the ServiceWorker ignore such requests and let them be handled by the browser directly to avoid breaking apps that would work without the ServiceWorker. [1]: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content#passive_mixed_content Fixes #23012 PR Close #25994
This PR contains the following updates: | Package | Type | Update | Change | References | |---|---|---|---|---| | @​angular/common | dependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/common/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | | @​angular/compiler | devDependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/compiler/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | | @​angular/compiler-cli | devDependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/compiler-cli/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | | @​angular/core | dependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/core/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | | @​angular/forms | dependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/forms/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | | @​angular/http | dependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/http/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | | @​angular/language-service | devDependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/language-service/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | | @​angular/platform-browser | dependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/platform-browser/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | | @​angular/platform-browser-dynamic | dependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/platform-browser-dynamic/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | | @​angular/router | dependencies | patch | [`7.2.7` -> `7.2.8`](https://diff.intrinsic.com/@angular/router/7.2.7/7.2.8) | [source](https://togithub.com/angular/angular) | --- ### Release Notes <details> <summary>angular/angular</summary> ### [`v7.2.8`](https://togithub.com/angular/angular/blob/master/CHANGELOG.md#​728httpsgithubcomangularangularcompare727728-2019-03-06) [Compare Source](https://togithub.com/angular/angular/compare/7.2.7...7.2.8) ##### Bug Fixes - **animations:** ensure `position` and `display` styles are handled outside of keyframes/web-animations ([#​28911](https://togithub.com/angular/angular/issues/28911)) ([86981b3](https://togithub.com/angular/angular/commit/86981b3)), closes [#​24923](https://togithub.com/angular/angular/issues/24923) [#​25635](https://togithub.com/angular/angular/issues/25635) - **router:** removed obsolete TODO comment ([#​29085](https://togithub.com/angular/angular/issues/29085)) ([2a25ac2](https://togithub.com/angular/angular/commit/2a25ac2)) - **service-worker:** detect new version even if files are identical to an old one ([#​26006](https://togithub.com/angular/angular/issues/26006)) ([5669333](https://togithub.com/angular/angular/commit/5669333)), closes [#​24338](https://togithub.com/angular/angular/issues/24338) - **service-worker:** ignore passive mixed content requests ([#​25994](https://togithub.com/angular/angular/issues/25994)) ([b598e88](https://togithub.com/angular/angular/commit/b598e88)), closes [/github.com/angular/angular/issues/23012#issuecomment-376430187](https://togithub.com//github.com/angular/angular/issues/23012/issues/issuecomment-376430187) [#​23012](https://togithub.com/angular/angular/issues/23012) </details> --- ### Renovate configuration :date: **Schedule**: At any time (no schedule defined). :vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied. :recycle: **Rebasing**: Whenever PR becomes conflicted, or if you modify the PR title to begin with "`rebase!`". :no_bell: **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- renovate-rebase -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/marketplace/renovate). View repository job log [here](https://renovatebot.com/dashboard#aerogear/ionic-showcase).
@gkalpak can you share document link how we can start using this? |
Not sure what you mean @shabbir-dhangot. You don't have to do anything. This was a change in |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
Current behavior
Angular service worker application throws following error
Expected behavior
It should not throw any exceptions
Minimal reproduction of the problem with instructions
Demo application on git below is the link
URL : https://github.com/akilmakda/PWA-not-work-in-HTTP
download application -> install npm -> build( ng build --prod) -> upload to any live server.
NOTE: in localhost, it works fine
Environment
The text was updated successfully, but these errors were encountered: