Unable to access database user from my local server in the remote server: LOG {"ACTIVITY_NULL": 4, "PERMISSION_DENIED": 1, "POSITION_UNAVAILABLE": 2, "TIMEOUT": 3, "code": 3, "message": "Location request timed out"} #1106
Labels
pending-triage
An issue that is pending triage
Describe the feature you'd like to request
When I try to save or have access to the database user, I am unable to access it. For example, if I try to save a user, sometimes it doesn't save. If it eventually saves, if I try to edit it from my app, and save, it doesn't reflect in amplify studio.
Describe your use case and how the feature would improve your experience.
I am setting database user here:
`import { createContext, useState,useEffect, useContext } from "react";
import { confirmResetPassword, getCurrentUser } from 'aws-amplify/auth';
import { DataStore, Predicates } from 'aws-amplify/datastore';
import { User } from "../models";
// import {Auth, Amplify, Predicates} from 'aws-amplify';
// import { getCurrentUser, AuthUser } from 'aws-amplify/auth';
// import { DataStore, AuthModeStrategyType } from 'aws-amplify/datastore';
const AuthContext = createContext({})
const AuthContextProvider = ({children})=>{
}
export default AuthContextProvider;
export const useAuthContext = ()=> useContext(AuthContext)`
I am trying to create or edit it here:
`// import '@azure/core-asynciterator-polyfill'
import { View, Text, TextInput, Button, Pressable, Alert } from 'react-native'
import React, {useEffect, useState, } from 'react'
import { GooglePlacesAutocomplete } from 'react-native-google-places-autocomplete';
import styles from './styles'
import { useAuthContext } from '../../contexts/AuthContext'
import { useNavigation } from '@react-navigation/native'
import { signOut } from 'aws-amplify/auth';
import { DataStore } from 'aws-amplify/datastore';
import {User} from '../../models'
const ProfileScreen = () => {
const {sub, dbUser, setDbUser} = useAuthContext()
const handleSignOut = async()=> {
try {
await signOut();
} catch (error) {
console.log('error signing out: ', error);
}
}
)
}
export default ProfileScreen`
However, most of the times, it is unable to access the database user to make changes.
Describe alternatives you've considered
I have considered doing amplify update api, automerge update, amplify codegen models and then amplify push, hoping i will be able to automatically access the database in the future, but I can't access it.
Additional context
No response
The text was updated successfully, but these errors were encountered: