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

Firebase Example Doesn't Work #113

Open
1 of 8 tasks
phidias51 opened this issue Jun 8, 2017 · 1 comment
Open
1 of 8 tasks

Firebase Example Doesn't Work #113

phidias51 opened this issue Jun 8, 2017 · 1 comment

Comments

@phidias51
Copy link

Description

I have a firebase-query that produces live data without any problem. Using the code from the example found in the documentation, the exception shown in the stacktrace below appears.

Expected outcome

It should cache the data locally.

Actual outcome

app-indexeddb-mirror.html:244 Uncaught TypeError: Cannot read property 'validateSession' of undefined
at HTMLElement. (app-indexeddb-mirror.html:244)
at HTMLElement._enqueueTransaction (app-storage-behavior.html:332)
at HTMLElement.__updatePersistedData (app-indexeddb-mirror.html:243)
at HTMLElement._complexObserverEffect (polymer.html:1613)
at HTMLElement._effectEffects (polymer.html:1448)
at HTMLElement._propertySetter (polymer.html:1432)
at HTMLElement.__setProperty (polymer.html:1441)
at HTMLElement._applyConfig (polymer.html:2054)
at HTMLElement._afterClientsReady (polymer.html:2048)
at HTMLElement._ready (polymer-mini.html:143)

This seems to indicate that the client property found in app-indexeddb-mirror is undefined.

Live Demo

Steps to reproduce

This is a snippet of the code. Commenting out the app-indexeddb-mirror element (and switching the data/model variable causes the data to appear normally, albeit uncached.

        <firebase-auth app-name="veridian" user="{{user}}" app-name="veridian"></firebase-auth>
        <firebase-query app-name="veridian" path="/users" data="{{data}}" order-by-child="lastName" limit-to-first="[[pageSize]]"></firebase-query>
        
        <app-indexeddb-mirror session="[[user.uid]]" key="contacts" data="{{data}}" persisted-data="{{model}}"></app-indexeddb-mirror>

<iron-scroll-threshold id="threshold" on-lower-threshold="_loadData" lower-threshold="10" scroll-target="listbox">
        <paper-listbox id="listbox">
            <template is="dom-repeat" items="[[model]]" as="contact">
                <ver-contact-card model="[[contact]]"></ver-contact-card>
            </template>
        </paper-listbox>
        </iron-scroll-threshold>

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
@Thkasis
Copy link

Thkasis commented Oct 19, 2017

I have the same issue here, in some pages it works and in some pages I get this error. My implementation is the same across all pages. I should say that app-network-status-behavior also is returning true event if there's no connection in Chrome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants