Skip to content
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

SYNTAX_ERR: DOM Exception 12 upon HTTP GET request on Android 4.2.2 native browser #18996

Closed
1 task done
jack-kerouac opened this issue Sep 1, 2017 · 3 comments
Closed
1 task done
Labels
area: common/http Issues related to HTTP and HTTP Client type: bug/fix

Comments

@jack-kerouac
Copy link

jack-kerouac commented Sep 1, 2017

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

When issuing the following XHR request, it fails with message SYNTAX_ERR: DOM Exception 12:

http.get<MyObject>('<URL_WITH_JSON_RESPONSE>', options: {
  params: new HttpParams().set('query', 'SOMETHING')
}

MyObject is any interface.

Expected behavior

The request to succeed and when subscribing to the observable, an instance of MyObject to be passed.

Minimal reproduction of the problem with instructions

http://embed.plnkr.co/HmWRisGIUs21qkTdgdbg/

Environment

Angular version: 4.3.5

Browser:

  • Android native browser, Android versions: 4.0.3, 4.2.2

Android 4.2 at least is claimed to be supported by Angular.

Context

I think that the problem has to do with non-supported requestType = 'json' on XHR requests on Android before 4.4.4: http://caniuse.com/#feat=xhr2. This Stack Overflow discussion details it: https://stackoverflow.com/questions/9845401/xmlhttprequest-responsetype-json-giving-error-syntax-err-dom-exception-12

Potentially related in issue in AngularJS: angular/angular.js#6115

@IgorMinar IgorMinar added area: common/http Issues related to HTTP and HTTP Client type: bug/fix labels Sep 7, 2017
@IgorMinar
Copy link
Contributor

I believe that this has already been fixed via an unrelated fix. @alxhub ?

@alxhub
Copy link
Member

alxhub commented Nov 28, 2017

Correct.

@alxhub alxhub closed this as completed Nov 28, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: common/http Issues related to HTTP and HTTP Client type: bug/fix
Projects
None yet
Development

No branches or pull requests

3 participants