Skip to content

When accessing a project using a domain name, data in absurd-sql cannot be loaded normally #77

@xkmy

Description

@xkmy

Detailed Description:

I modified the host in Webpack to '0.0.0.0' and used a domain name to access the local service. After initializing the database, creating the orders table, and adding some data, I refreshed the page. Upon refreshing, I re-initialized the database (at this point, the orders table already exists). However, when executing a query, the following error occurred: "Error: no such table: orders" (it seems that the data in IndexedDB is not being properly linked). Nevertheless, subsequent insertions and queries can be executed normally. Could you please explain the cause of this issue and how I can resolve it so that the domain name can be used for proper access? Thank you!

Additional description:
When using localhost:8080, no errors occur, and everything works as expected.

I am using the example code from the repository: https://github.com/jlongster/absurd-sql/tree/master/src/examples/fts

Webpack configuration is as follows:

export default {
devtool: 'inline-source-map',
devServer: {
publicPath: '/',
allowedHosts: ['.xy.com'],
hot: true,
port: 8080,
host: '0.0.0.0',
compress: false
},
mode: 'development',
resolve: {
extensions: ['.js', '.ts', '.tsx', '.json', '.wasm'],
fallback: {
crypto: false,
path: false,
fs: false
}
},
plugins: [new HtmlWebpackPlugin({ template: './src/index.html' })]
};

Version Information:

absurd-sql version 0.0.46
@jlongster/sql.js version 1.6.7

Error screenshot:
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions