Closed mdoesburg closed 3 years ago
@mdoesburg just out of curiosity, have you tried creating a new cloud environment for your app?
amplify env add {new_name}
amplify push
amplify env checkout {new_name}
If that doesn't make a difference, you can always go back to the previous env and delete this one with:
amplify env checkout {previous_name}
amplify env remove {new_name}
I'm just wondering if maybe the error you're getting is the result of some combination of iterative changes to the schema... Obviously, that shouldn't be leading to errors, but I thought this might be worth trying anyways.
@iartemiev I already had 2 environments, but tried making another one because you never know. :p Unfortunately it didn't fix anything, and I am getting the same subscription error and the websocket closes.
Got it. Thanks for trying that!
Does the shape of the schema in src/models/schema.js
for User
look the same in the sample app vs your app?
What about the generated graphql schema in amplify/backend/api/app-name/build/schema.graphql
?
@iartemiev schema.js
for User
is an exact match, so is the type User
in schema.graphql
for both apps.
Are you getting the error for any signed-in user? Or just those that don't belong to the Admin group?
@iartemiev Only users that don't belong to the Admin group get the error.
@mdoesburg, you're correct that if a single subscription fails, we currently close all subscriptions. We will be changing this behavior to allow other subscriptions to continue when this happens.
We will be changing this behavior to allow other subscriptions to continue when this happens.
@iartemiev That would be nice! Any timeline on when this will be added?
This is happening to me as well (RN project) with the following schema:
type Config @model @auth(rules: [{ allow: owner, operations: [read, create, update] }]) {
id: ID!
conektaId: String
paymentSources: AWSJSON
}
type Service @model @auth(rules: [{ allow: private, provider: userPools, operations: [read] }]) {
id: ID!
name: String!
image: String!
order: Int!
}
when I upgrade to:
@aws-amplify/datastore@2.2.7+
2.2.6 works fine
@mdoesburg we're currently reviewing a PR that fixes this, so it will be very soon
@mdoesburg just merged the PR, so please try with the latest unstable versions
@iartemiev I can confirm that the websocket no longer closes on the latest unstable version.
Great! The changes will be included in the next stable release that'll go out in the very near future. Can we close this issue?
@iartemiev Yes, go ahead and close it! Thanks again for your help, I really appreciate it! :)
Of course! Glad we were able to resolve this (:
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.
Describe the bug After upgrading the DataStore from version 2.2.6 to 2.2.7, the following error is printed in the console right after the DataStore is ready:
DataStore version 2.2.7 introduces some bug fix I need:
This issue persists even in the latest DataStore version (2.2.9), and while having all the other Amplify packages up-to-date.
I have these packages installed:
Downgrading the DataStore version to 2.2.6 fixes this issue, but leaves me without the bug fixes.
Expected behavior I expect realtime data to keep working after upgrading to the latest version of the DataStore.