electric-sql / electric

Sync little subsets of your Postgres data into local apps and services.
https://electric-sql.com
Apache License 2.0
6.04k stars 139 forks source link

error when updating from 0.9.2 to 0.9.3 #977

Closed barbalex closed 6 months ago

barbalex commented 6 months ago

When updating a working app I get this error on first render:

TypeError: Cannot read properties of undefined (reading 'subscribe')
    at http://localhost:5173/node_modules/.vite/deps/electric-sql_react.js?v=72bd7483:103:34
    at commitHookEffectListMount (http://localhost:5173/node_modules/.vite/deps/chunk-YQDERSFP.js?v=72bd7483:16904:34)
    at commitPassiveMountOnFiber (http://localhost:5173/node_modules/.vite/deps/chunk-YQDERSFP.js?v=72bd7483:18152:19)
    at commitPassiveMountEffects_complete (http://localhost:5173/node_modules/.vite/deps/chunk-YQDERSFP.js?v=72bd7483:18125:17)
    at commitPassiveMountEffects_begin (http://localhost:5173/node_modules/.vite/deps/chunk-YQDERSFP.js?v=72bd7483:18115:15)
    at commitPassiveMountEffects (http://localhost:5173/node_modules/.vite/deps/chunk-YQDERSFP.js?v=72bd7483:18105:11)
    at flushPassiveEffectsImpl (http://localhost:5173/node_modules/.vite/deps/chunk-YQDERSFP.js?v=72bd7483:19486:11)
    at flushPassiveEffects (http://localhost:5173/node_modules/.vite/deps/chunk-YQDERSFP.js?v=72bd7483:19443:22)
    at http://localhost:5173/node_modules/.vite/deps/chunk-YQDERSFP.js?v=72bd7483:19324:17
    at workLoop (http://localhost:5173/node_modules/.vite/deps/chunk-YQDERSFP.js?v=72bd7483:197:42)

Here a screenshot:

Bildschirmfoto 2024-02-21 um 17 19 00

Reverting electric-sql to 0.9.2 solves the issue.

linear[bot] commented 6 months ago

VAX-1689 error when updating from 0.9.2 to 0.9.3

samwillis commented 6 months ago

Hey @barbalex,

There is an API breaking change in this release, "electrification" and connection have been broken into two steps. You are slightly ahead of us on dropping a note on the Discord channel.

The docs are updated: https://electric-sql.com/docs/api/clients/typescript#instantiation

During the "alpha" phase we are only bumping the minor version of electric when here are incompatible changes to the sync protocol. This can mean that the client API with break on a patch release, this will change latter on.