Open
Description
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
- 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;
}
});
Additional Info
Platform: MacOS 15.2 x86_64
@powersync/web: 1.12.1
Metadata
Metadata
Assignees
Labels
No labels
Activity