Closed sadaqatdev closed 2 years ago
Hi @sadaqatdev thanks for opening this issue. The exception is very self explanatory.
after adding new model to data store we faced this issue
amplify pull
to update amplifyconfiguration.dart
?flutter clean
before rebuild the App?but working fine in iOS, only error in android and I have done amplify pull and Flutter clean , still error exits
Can you paste the content of amplifyconfiguration.dart
(please mask out sensitive data fields).
Also the code snippet initiating API and DataStore plugin.
Looking at the amplify-android implementation, it throws this exception due to the API request object doesn't have a valid authType
defined. May need more Information to reproduce this issue.
@sadaqatdev - If you are still experiencing this issue can you please provide the info request above? Thanks.
@sadaqatdev - I am going to close out this issue since we have not heard back. If you are still experiencing this issue, please open a new issue with the info requested above. Thanks.
Description
after adding new model to data store we faced this issue , in iOS data is syncing perfectly. only we have face this issue in android
W/amplify:aws-datastore(27849): DataStoreException{message=Error during subscription., cause=ApiAuthException{message=Tried to use owner/group-based authorization on an API that is not configured with either Cognito User Pools or OpenID Connect., cause=null, recoverySuggestion=Verify that the API is configured with either Cognito User Pools or OpenID Connect. @auth with owner/group-based authorization is not supported for other modes.}, recoverySuggestion=Evaluate details.}
Graphql schema
type RoomConnectServiceStatus @model @auth(rules: [{allow: owner, operations: [read, create, update, delete]}, {allow: private, operations: [read, create, update, delete], provider: iam}, {allow: public, operations: [read, create, update, delete], provider: iam}]) { id: ID! isActivated: Boolean roomId: String serviceID: String currentDeviceUid: String updateTime: AWSTimestamp }
type MqttCloudConfig @model @auth(rules: [{allow: owner, operations: [read, create, update, delete]}, {allow: private, operations: [read], provider: iam}, {allow: public, operations: [read], provider: iam}]) { id: ID! ip: String port: String password: String username: String }
type Nurse @model @auth(rules: [{allow: owner, operations: [read, create, update, delete]}, {allow: private, operations: [read, create, update, delete], provider: iam}, {allow: public, operations: [read, create, update, delete], provider: iam}]) { id: ID! name: String phone: AWSPhone! thumbnail: String }
type Owner @model @auth(rules: [{allow: owner, operations: [read, create, update, delete]}, {allow: private, operations: [read, create, update, delete], provider: iam}, {allow: public, operations: [read, create, update, delete], provider: iam}]) { id: ID! roomID: ID nurseID: ID }
type Room @model @auth(rules: [{allow: owner, operations: [read, create, update, delete]}, {allow: private, operations: [read, create, update, delete], provider: iam}, {allow: public, operations: [read, create, update, delete], provider: iam}]) { id: ID! title: String }
type RoomConnecttoService @model @auth(rules: [{allow: owner, operations: [read, create, update, delete]}, {allow: private, operations: [read, create, update, delete], provider: iam}, {allow: public, operations: [read, create, update, delete], provider: iam}]) { id: ID! roomID: ID serviceID: ID currentDeviceUid: String isActivated: Boolean }
type Services @model @auth(rules: [{allow: owner, operations: [read, create, update, delete]}, {allow: private, operations: [read, create, update, delete], provider: iam}, {allow: public, operations: [read, create, update, delete], provider: iam}]) { id: ID! name: String ordered: Boolean fulfilled: Boolean thumbnail: String roomConnectoId: String }
type Patient @model @auth(rules: [{allow: owner, operations: [read, create, update, delete]}, {allow: private, operations: [read, create, update, delete], provider: iam}, {allow: public, operations: [read, create, update, delete], provider: iam}]) { id: ID! name: String phone: AWSPhone! thumbnail: String }
type SubscribedRooms @model @auth(rules: [{allow: owner, operations: [read, create, update, delete]}, {allow: private, operations: [read, create, update, delete], provider: iam}, {allow: public, operations: [read, create, update, delete], provider: iam}]) { id: ID! roomID: ID userID: ID }
Categories
Steps to Reproduce
add new data model to data store and run pub update command
Screenshots
No response
Platforms
Android Device/Emulator API Level
API 29, API 30, API 31
Environment
Dependencies
Device
N/A
OS
N/A
CLI Version
8.0.2
Additional Context
after adding new model to data store we faced this issue