PolymerElements / iron-ajax

Easily make ajax requests
https://www.webcomponents.org/element/PolymerElements/iron-ajax
127 stars 113 forks source link

Error in Firefox 58.0.2: "TypeError: request.completes is undefined" #315

Open njbartlett opened 6 years ago

njbartlett commented 6 years ago

Description

I have a page with an iron-ajax defined as follows:

        <iron-ajax id="ajax"
            auto
            url="http://[[server]]:[[port]][[path]]"
            params="[[_computeParams(query)]]"
            debounce-duration="500"
            handle-as="json"
            on-response="_handleResponse"
            on-error="_handleError"
            loading="{{_loading}}"
            verbose
        ></iron-ajax>

This works perfectly on Chrome and Safari. However on Firefox 58.0.2 I get no data, and an error in the console (see below).

I have tried with iron-ajax versions 2.1.0 and 2.1.2.

Expected outcome

Data displayed in Firefox the same as Chrome/Safari.

Actual outcome

Error in console, no data:

TypeError: request.completes is undefined [Learn More]
generateRequest
http://127.0.0.1:8081/components/iron-ajax/iron-ajax.html.js:441:5
_requestOptionsChanged/<
http://127.0.0.1:8081/components/iron-ajax/iron-ajax.html.js:550:9
<anonymous> self-hosted:948:17 setConfig/this._timer<
http://127.0.0.1:8081/components/polymer/lib/utils/debounce.html.js:30:9
microtaskFlush
http://127.0.0.1:8081/components/polymer/lib/utils/async.html.js:21:11

Live Demo

Not available, sorry.

Steps to reproduce

Browsers Affected

chadmasso commented 6 years ago

Running into the same issue. Any updates?

nicolethenerd commented 5 years ago

I ran into this issue and it turned out I was including a very old version of the Custom Elements Polyfill (https://github.com/webcomponents/custom-elements). Removing it solved the problem.