You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling powersync.execute() will result in error "Unhandled Promise Rejection: RangeError: Maximum call stack size exceeded.". This is observed only on MacOS 15.2 (and 15.2 beta) and Safari.
Reproduction
Change the code of index.js of powersync-ja/demos/example-vite as below.
pnpm i && pnpm dev
visit localhost:5173 using Safari, open console and you will see the error after some time.
import { column, Schema, Table, PowerSyncDatabase } from '@powersync/web';
import Logger from 'js-logger';
Logger.useDefaults();
/**
* A placeholder connector which doesn't do anything.
* This is just used to verify that the sync workers can be loaded
* when connecting.
*/
class DummyConnector {
async fetchCredentials() {
return {
endpoint: '',
token: ''
};
}
async uploadData(database) {}
}
const customers = new Table({ name: column.text })
export const AppSchema = new Schema({ customers });
let PowerSync;
const openDatabase = async () => {
PowerSync = new PowerSyncDatabase({
schema: AppSchema,
database: { dbFilename: 'test.sqlite' }
});
await PowerSync.init();
//await PowerSync.connect(new DummyConnector());
};
document.addEventListener('DOMContentLoaded', async (event) => {
await openDatabase();
let name = 0;
while (name < 10000) {
console.log('name: ', name);
await PowerSync.execute('INSERT INTO customers(id, name) VALUES(uuid(), ?)', [`${name}`]);
name += 1;
}
});
Hey @hut36, do you have discord available? A possible fix has been discussed here alongside a dev release. We are working on an official version of this release that addresses this problem formally.
I haven't tested this specific demo with the dev release, but I can check it.
Just an update @hut36, I was able to reproduce the issue with your code against the latest Safari.
I can also confirm that with the dev release using either WASQLiteVFS.OPFSCoopSyncVFS or WASQLiteVFS.AccessHandlePoolVFS the issue is fixed. Will follow up when it is released.
Description
Calling powersync.execute() will result in error "Unhandled Promise Rejection: RangeError: Maximum call stack size exceeded.". This is observed only on MacOS 15.2 (and 15.2 beta) and Safari.
Reproduction
pnpm i && pnpm dev
Additional Info
Platform: MacOS 15.2 x86_64
@powersync/web: 1.12.1
The text was updated successfully, but these errors were encountered: