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

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

Open
xkmy opened this issue Aug 29, 2024 · 0 comments

Comments

@xkmy
Copy link

xkmy commented Aug 29, 2024

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

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

1 participant