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

Amplify Sync WIth Sqlite Database not working #9463

Closed
3 tasks done
prasadk-foodhub opened this issue Jan 11, 2022 · 3 comments
Closed
3 tasks done

Amplify Sync WIth Sqlite Database not working #9463

prasadk-foodhub opened this issue Jan 11, 2022 · 3 comments
Assignees
Labels
DataStore Related to DataStore category

Comments

@prasadk-foodhub
Copy link

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

DataStore, Storage

Amplify Categories

storage

Environment information

System: OS: macOS 11.4 CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz Memory: 27.00 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.16.1 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.12 - /usr/local/bin/npm Browsers: Safari: 14.1.1 npmPackages: @aws-amplify/datastore-storage-adapter: ^1.2.4 => 1.2.4 @babel/core: 7.8.4 => 7.8.4 (7.16.7) @babel/runtime: 7.8.4 => 7.8.4 (7.16.7) @react-native-async-storage/async-storage: ^1.15.14 => 1.15.14 @react-native-community/art: 1.2.0 => 1.2.0 @react-native-community/datetimepicker: 3.0.8 => 3.0.8 @react-native-community/eslint-config: 2.0.0 => 2.0.0 @react-native-community/google-signin: 5.0.0 => 5.0.0 @react-native-community/masked-view: 0.1.11 => 0.1.11 @react-native-community/netinfo: ^7.1.7 => 7.1.7 @react-native-community/progress-view: 1.3.1 => 1.3.1 @react-native-community/push-notification-ios: 1.8.0 => 1.8.0 @react-native-firebase/analytics: 10.1.1 => 10.1.1 @react-native-firebase/app: 10.8.0 => 10.8.0 @react-native-firebase/auth: 10.8.0 => 10.8.0 @react-native-firebase/crashlytics: 10.8.0 => 10.8.0 @react-native-firebase/firestore: 10.8.0 => 10.8.0 @react-native-firebase/messaging: 10.8.0 => 10.8.0 @react-native-picker/picker: ^2.2.1 => 2.2.1 @react-navigation/core: 3.7.9 => 3.7.9 @react-navigation/native: 3.6.2 => 3.6.2 (3.8.4) @react-navigation/web: 1.0.0-alpha.9 => 1.0.0-alpha.9 @svgr/webpack: 5.5.0 => 5.5.0 @types/jest: 26.0.20 => 26.0.20 HelloWorld: 0.0.1 RNBackgroundExample: 0.0.1 ReactWebConfigExample: 1.0.0 add: 2.0.6 => 2.0.6 amazon-cognito-identity-js: ^5.2.4 => 5.2.4 appcenter: 4.1.0 => 4.1.0 appcenter-analytics: 4.1.0 => 4.1.0 appcenter-crashes: 4.1.0 => 4.1.0 aws-amplify: ^4.3.12 => 4.3.12 aws-amplify-react-native: ^6.0.2 => 6.0.2 axios: 0.21.1 => 0.21.1 (0.21.4) babel-jest: 26.6.3 => 26.6.3 babel-loader: 8.2.2 => 8.2.2 babel-plugin-react-native-web: 0.17.1 => 0.17.1 base-64: 1.0.0 => 1.0.0 (0.1.0) css-loader: 6.4.0 => 6.4.0 dotenv-webpack: 7.0.3 => 7.0.3 enzyme: 3.11.0 => 3.11.0 enzyme-adapter-react-16: 1.15.5 => 1.15.5 eslint: 7.15.0 => 7.15.0 eslint-config-prettier: 7.0.0 => 7.0.0 (6.15.0) eslint-plugin-jest: 24.1.3 => 24.1.3 (22.4.1) eslint-plugin-prettier: 3.2.0 => 3.2.0 (3.1.2) eslint-plugin-react: 7.21.5 => 7.21.5 (7.28.0) eslint-plugin-react-hooks: 4.3.0 => 4.3.0 file-loader: 6.2.0 => 6.2.0 file-saver: 2.0.5 => 2.0.5 firebase: 9.3.0 => 9.3.0 firebase/analytics: undefined () firebase/app: undefined () firebase/app-check: undefined () firebase/auth: undefined () firebase/auth/cordova: undefined () firebase/auth/react-native: undefined () firebase/compat: undefined () firebase/compat/analytics: undefined () firebase/compat/app: undefined () firebase/compat/app-check: undefined () firebase/compat/auth: undefined () firebase/compat/database: undefined () firebase/compat/firestore: undefined () firebase/compat/functions: undefined () firebase/compat/messaging: undefined () firebase/compat/performance: undefined () firebase/compat/remote-config: undefined () firebase/compat/storage: undefined () firebase/database: undefined () firebase/firestore: undefined () firebase/firestore/lite: undefined () firebase/functions: undefined () firebase/messaging: undefined () firebase/messaging/sw: undefined () firebase/performance: undefined () firebase/remote-config: undefined () firebase/storage: undefined () hermes-inspector-msggen: 1.0.0 html-webpack-plugin: 5.3.2 => 5.3.2 husky: 4.3.8 => 4.3.8 instabug-reactnative: 10.11.0 => 10.11.0 jest: 26.6.3 => 26.6.3 jest-enzyme: 7.1.2 => 7.1.2 jetifier: 1.6.6 => 1.6.6 (1.6.8) libphonenumber-js: 1.9.6 => 1.9.6 libphonenumber-js-core: 1.0.0 libphonenumber-js-max: 1.0.0 libphonenumber-js-min: 1.0.0 libphonenumber-js-mobile: 1.0.0 lint-staged: 10.5.3 => 10.5.3 localforage: 1.10.0 => 1.10.0 lodash: 4.17.20 => 4.17.20 (4.17.21) lottie-ios: 3.2.3 => 3.2.3 (3.1.8) lottie-react-native: 4.0.3 => 4.0.3 (4.1.3) md5: 2.3.0 => 2.3.0 metro-react-native-babel-preset: 0.64.0 => 0.64.0 (0.59.0) mockdate: 3.0.5 => 3.0.5 moment: 2.29.1 => 2.29.1 moment-timezone: 0.5.32 => 0.5.32 msw: ^0.35.0 => 0.35.0 pako: 1.0.11 => 1.0.11 patch-package: 6.4.7 => 6.4.7 performance-now: 2.1.0 => 2.1.0 postman-collection: ^4.1.0 => 4.1.1 prettier: 2.2.1 => 2.2.1 (2.5.1) prop-types: 15.7.2 => 15.7.2 (15.8.1) query-string: 7.0.1 => 7.0.1 (6.14.1, 6.10.1) react: 16.13.1 => 16.13.1 react-animated: 0.1.0 react-datetime: 3.1.1 => 3.1.1 react-devtools: 4.14.0 => 4.14.0 react-dom: 17.0.2 => 17.0.2 react-easy-crop: 3.5.3 => 3.5.3 react-google-login: 5.2.2 => 5.2.2 react-icomoon: 2.4.1 => 2.4.1 react-localization: 1.0.17 => 1.0.17 react-native: 0.63.4 => 0.63.4 react-native-background-timer: 2.4.1 => 2.4.1 react-native-background-upload: 6.2.0 => 6.2.0 react-native-bcrypt: 2.4.0 => 2.4.0 react-native-calendars: 1.1262.0 => 1.1262.0 react-native-camera: 3.40.0 => 3.40.0 react-native-code-push: 6.4.0 => 6.4.0 react-native-config: 1.4.1 => 1.4.1 react-native-contacts: 6.0.3 => 6.0.3 react-native-device-info: 7.3.1 => 7.3.1 react-native-document-picker: 4.1.0 => 4.1.0 react-native-draggable-flatlist: 2.6.2 => 2.6.2 react-native-exit-app: 1.1.0 => 1.1.0 react-native-fast-image: 8.3.4 => 8.3.4 react-native-fs: 2.16.6 => 2.16.6 react-native-gesture-handler: 1.10.3 => 1.10.3 react-native-image-crop-picker: 0.36.2 => 0.36.2 react-native-image-picker: 3.3.2 => 3.3.2 react-native-ios-picker: 1.0.0 => 1.0.0 react-native-keyboard-aware-scroll-view: 0.9.3 => 0.9.3 react-native-largelist: 3.1.0-rc.2 => 3.1.0-rc.2 react-native-linear-gradient: 2.5.6 => 2.5.6 react-native-loader: 1.3.1 => 1.3.1 react-native-maps: 0.27.1 => 0.27.1 react-native-modal: 11.5.6 => 11.5.6 react-native-modal-datetime-picker: 9.1.0 => 9.1.0 react-native-permissions: 3.0.0 => 3.0.0 (2.2.2) react-native-popup-menu: 0.15.11 => 0.15.11 react-native-print: 0.9.0 => 0.9.0 react-native-progress: 4.1.2 => 4.1.2 react-native-push-notification: 6.1.3 => 6.1.3 react-native-qrcode-scanner: 1.4.1 => 1.4.1 react-native-qrcode-svg: 6.1.1 => 6.1.1 react-native-reanimated: 1.13.3 => 1.13.3 react-native-render-html: 4.1.2 => 4.1.2 react-native-safe-area-context: 3.3.2 => 3.3.2 react-native-screens: 2.16.1 => 2.16.1 (1.0.0-alpha.23) react-native-select-contact: 1.5.0 => 1.5.0 react-native-send-intent: 1.3.0 => 1.3.0 react-native-simple-download-manager: 1.4.1 => 1.4.1 react-native-slider: 0.11.0 => 0.11.0 react-native-sound: 0.11.0 => 0.11.0 react-native-splash-screen: 3.2.0 => 3.2.0 react-native-spring-scrollview: 3.0.1-rc.5 => 3.0.1-rc.5 react-native-sqlite-storage: ^6.0.1 => 6.0.1 react-native-svg: 12.1.0 => 12.1.0 react-native-swipe-list-view: 3.2.5 => 3.2.5 react-native-swiper: 1.6.0 => 1.6.0 react-native-switch-selector: 2.0.6 => 2.0.6 react-native-system-setting: 1.7.6 => 1.7.6 react-native-tab-view: 2.15.2 => 2.15.2 (2.16.0) react-native-thumbnail-video: 0.1.2 => 0.1.2 react-native-user-inactivity: 1.2.0 => 1.2.0 react-native-vector-icons: 7.1.0 => 7.1.0 react-native-version-number: 0.3.6 => 0.3.6 react-native-walkthrough-tooltip: 1.3.0 => 1.3.0 react-native-web: 0.17.1 => 0.17.1 react-native-web-linear-gradient: 1.1.2 => 1.1.2 react-native-web-lottie: 1.4.4 => 1.4.4 react-native-web-maps: 0.3.0 => 0.3.0 react-native-web-webview: 1.0.2 => 1.0.2 react-native-webview: 11.0.2 => 11.0.2 react-native-youtube-iframe: 2.1.0 => 2.1.0 react-native-zohosalesiq-mobilisten: 4.1.0 => 4.1.0 react-navigation: 4.4.4 => 4.4.4 react-navigation-drawer: 2.7.1 => 2.7.1 react-navigation-hooks: 1.1.0 => 1.1.0 react-navigation-stack: 1.8.0 => 1.8.0 react-navigation-tabs: 2.7.0 => 2.7.0 react-redux: 7.2.2 => 7.2.2 react-test-renderer: 16.13.1 => 16.13.1 (16.14.0) react-to-print: 2.13.0 => 2.13.0 react-web-config: git://github.com/Hortau/react-web-config.git#webpack5 => 2.0.0 reactotron-react-native: 5.0.0 => 5.0.0 reactotron-redux: 3.1.3 => 3.1.3 redux: 4.0.5 => 4.0.5 (4.1.2) redux-logger: 3.0.6 => 3.0.6 redux-persist: 6.0.0 => 6.0.0 redux-persist-filesystem-storage: 3.0.0 => 3.0.0 redux-persist-transform-filter: 0.0.20 => 0.0.20 redux-persist/integration/react: undefined () redux-saga: 1.1.3 => 1.1.3 redux-saga-tester: ^1.0.874 => 1.0.874 redux-saga/effects: undefined () rn-fetch-blob: 0.12.0 => 0.12.0 rn-placeholder: 3.0.3 => 3.0.3 style-loader: 3.3.0 => 3.3.0 t2s-react-native-printer-library: file:./PrinterLibrary => 1.0.0 url-loader: 4.1.1 => 4.1.1 use-file-picker: 1.4.0 => 1.4.0 webpack: 5.58.0 => 5.58.0 (5.65.0) webpack-cli: 4.9.0 => 4.9.0 webpack-dev-server: 4.3.1 => 4.3.1 npmGlobalPackages: @aws-amplify/cli: 5.3.0 @vercel/ncc: 0.32.0 amplify: 0.0.11 aws-cdk: 1.128.0 aws-cli: 0.0.2 aws-config: 1.4.0 cdk: 1.117.0 create-react-app: 4.0.3 detox-cli: 18.14.1 npm: 6.14.12 postman-collection-transformer: 4.1.3 ts-node: 10.2.0 typescript: 4.3.5 yarn: 1.22.10

Describe the bug

no such table: Setting
no such table: ModelMetadata

This are the errors logs.Please advise .I tried below code

import { DataStore } from 'aws-amplify';
import { SQLiteAdapter } from '@aws-amplify/datastore-storage-adapter';

DataStore.configure({
storageAdapter: SQLiteAdapter
});

Expected behavior

Sync should happen above error blocking the sync process

Reproduction steps

import { DataStore } from 'aws-amplify';
import { SQLiteAdapter } from '@aws-amplify/datastore-storage-adapter';

DataStore.configure({
storageAdapter: SQLiteAdapter
});

Code Snippet

import { DataStore } from 'aws-amplify';
import { SQLiteAdapter } from '@aws-amplify/datastore-storage-adapter';

DataStore.configure({
storageAdapter: SQLiteAdapter
});

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

Iphone 8 Plus

Mobile Operating System

IOS 14

Mobile Browser

Ios simulator

Mobile Browser Version

No response

Additional information and screenshots

No response

@chrisbonifacio chrisbonifacio self-assigned this Jan 12, 2022
@chrisbonifacio chrisbonifacio added DataStore Related to DataStore category pending-triage Issue is pending triage labels Jan 12, 2022
@chrisbonifacio
Copy link
Member

chrisbonifacio commented Jan 12, 2022

Hi @prasadk-foodhub 👋 thanks for raising this issue.

Are you experiencing this issue on both iOS and Android? I don't see any mention of Expo so am I correct in assuming that you are working on a React Native CLI generated project? Just trying to rule out some causes.

If it is a React Native CLI project, can you try calling DataStore.start in a useEffect from the main App component or even just making a query (DataStore.query) should start the sync process. Let me know if the issue still persists then.

@chrisbonifacio chrisbonifacio added pending-response and removed pending-triage Issue is pending triage labels Jan 12, 2022
@chrisbonifacio
Copy link
Member

Hi 👋 Closing this as we have not heard back from you. If you are still experiencing this issue and in need of assistance, please feel free to comment and provide us with any information previously requested by our team members so we can re-open this issue and be better able to assist you. Thank you!

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
DataStore Related to DataStore category
Projects
None yet
Development

No branches or pull requests

2 participants