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 issue #5706

Closed
2 of 14 tasks
Technical-Team-4Dev opened this issue Nov 23, 2024 · 9 comments
Closed
2 of 14 tasks

amplify issue #5706

Technical-Team-4Dev opened this issue Nov 23, 2024 · 9 comments
Assignees
Labels
datastore Issues related to the DataStore Category not-reproducible Issues that cannot be reproduced using the steps provided question A question about the Amplify Flutter libraries

Comments

@Technical-Team-4Dev
Copy link

Description

when i run my flutter app through my not9 device i see in the console the following logs appears repeatedly in progress and never stop till i exit app or stop suning
I/amplify:aws-datastore(10984): DataStore plugin initialized.
I/amplify:aws-datastore(10984): Orchestrator lock released.
I/amplify:aws-datastore(10984): Orchestrator lock acquired.

my amplify vesion is the latest available
amplify --v
12.13.1

please help me because these logs prevent me from tracking my app behavior and make my development very hard

Categories

  • Analytics
  • API (REST)
  • API (GraphQL)
  • Auth
  • Authenticator
  • DataStore
  • Notifications (Push)
  • Storage

Steps to Reproduce

1- run flutter app
2- open the console
3- the logs appear

Screenshots

image

Platforms

  • iOS
  • Android
  • Web
  • macOS
  • Windows
  • Linux

Flutter Version

3.24.3

Amplify Flutter Version

12.13.1

Deployment Method

Amplify CLI (Gen 1)

Schema

# This "input" configures a global authorization rule to enable public access to
# all models in this schema. Learn more about authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules
input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } # FOR TESTING ONLY!

type Blog @model {
  id: ID!
  name: String!
  posts: [Post] @hasMany
}

type Post @model {
  id: ID!
  title: String!
  blog: Blog @belongsTo
  comments: [Comment] @hasMany
}

type Comment @model {
  id: ID!
  post: Post @belongsTo
  content: String!
}
# Input for global authorization (optional)
input AMPLIFY { globalAuthRule: AuthRule = { allow: public } }
# MainAccount-related models
type MainAccount @model {
  id: ID!
  mainAccountName: String!
  userName: String
  details: String
  icon: String
  defaultCurrency: String
  isDeleted: Int!
  subAccounts: [SubAccount] @hasMany(fields: ["id"])
}

type SubAccount @model {
  id: ID!
  mainAccountId: ID!
  mainAccount: MainAccount @belongsTo(fields: ["mainAccountId"])
  subAccountName: String!
  defaultCurrency: String
  userName: String
  image: String
  phoneNumber: String
  whatsAppNumber: String
  address: String
  note: String
  messagingWay: MessagingWay
  messagingType: MessagingType
  isDeleted: Int!
  debtOperations: [DebtOperation] @hasMany(fields: ["id"])
}

enum MessagingWay {
  sms
  whats
}

enum MessagingType {
  directly
  assurance
  never
}

type DebtOperation @model {
  id: ID!
  subAccountId: ID!
  subAccount: SubAccount @belongsTo(fields: ["subAccountId"])
  userName: String
  moneyAmount: Float!
  wholeSaleAmount: String
  retailAmount: String
  currency: String!
  details: String
  operationType: OperationType
  screenClosed: ScreenClosed
  addDateTime: AWSDateTime!
  isDeleted: Int
}

enum OperationType {
  ALIH
  LAHU
}

enum ScreenClosed {
  yes
  no
}

type ArchiveSubAccount @model {
  id: ID!
  subAccountName: String!
  defaultCurrency: String
  userName: String
  image: String
  phoneNumber: String
  whatsAppNumber: String
  address: String
  note: String
  messagingWay: MessagingWay
  messagingType: MessagingType
  isDeleted: Int!
  archiveDebtOperations: [ArchiveDebtOperation] @hasMany(fields: ["id"])
}

type ArchiveDebtOperation @model {
  id: ID!
  archiveSubAccountId: ID!
  archiveSubAccount: ArchiveSubAccount @belongsTo(fields: ["archiveSubAccountId"])
  userName: String
  moneyAmount: Float!
  wholeSaleAmount: String
  retailAmount: String
  currency: String!
  details: String
  operationType: OperationType
  screenClosed: ScreenClosed
  addDateTime: AWSDateTime!
  isDeleted: Int
}

type Currency @model {
  id: ID!
  currencyName: String!
}

type Settings @model {
  fieldName: String!
  label: String!
  isVisible: Int
}

type PreviousEntry @model {
  id: ID!
  textEntry: String!
}

type Password @model {
  id: ID!
  password: String!
}

enum SerialType {
  local
  mainAccount
  subAccount
}

type UserSerials @model {
  id: ID!
  userSerialNumber: String!
  userSerialPassword: String
  serialType: SerialType
  endedAt: AWSDateTime
  isSerialActive: Int
}

type UserInfo @model {
  id: ID!
  userName: String
  lastName: String
  marketName: String
  userPhone: String
  userEmail: String
  googleId: String
  password: String
  isFirstTime: Int
  trialStartDate: AWSDateTime
  trialActive: Int
  trialEndDate: AWSDateTime
  isActivated: Int
}
@github-actions github-actions bot added pending-triage This issue is in the backlog of issues to triage pending-maintainer-response Pending response from a maintainer of this repository labels Nov 23, 2024
@ekjotmultani
Copy link
Member

Hello @Technical-Team-4Dev , thank you for raising this issue, I'm sorry that the logs are non stop looping these same messages. We will investigate the issue and attempt to reproduce it, we will get back to you once we can

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Nov 25, 2024
@ekjotmultani ekjotmultani added datastore Issues related to the DataStore Category to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided labels Nov 25, 2024
@Technical-Team-4Dev
Copy link
Author

Technical-Team-4Dev commented Nov 26, 2024

and i got another issue related to amplify , this issue is when i made apk release of the flutter app the amplify datastrore and synchronize worked for the firs time after installation and the second time i entered the app i found no data at all and when i tried to insert new i couldnot as if no database at all please can you help me with this issue as well

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Nov 26, 2024
@ekjotmultani
Copy link
Member

Hi @Technical-Team-4Dev, sure thing. Could you provide the code for how you are synchronizing to datastore?

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Nov 26, 2024
@Technical-Team-4Dev
Copy link
Author

sure , i just made the configuration in the main.dart

Future configureAmplify() async {
try {

await Amplify.addPlugins([
  AmplifyAuthCognito(), 
  AmplifyDataStore(
      modelProvider: ModelProvider.instance), 
  AmplifyAPI(), 
]);

// Configure Amplify
await Amplify.configure(amplifyconfig);
print("Amplify configured successfully");

} catch (e) {
print("Error configuring Amplify: $e");
}
}

void main() async {
WidgetsFlutterBinding.ensureInitialized();
await configureAmplify();
final DatabaseHelper dbHelper = DatabaseHelper();
final Database database = await dbHelper.database;
Get.put(DebtOperationController(), permanent: true);
Get.lazyPut(() => UserController(database), fenix: true);
Get.put(SubAccountController(), permanent: true);
Get.put(ArchiveDebtOperationController(database));
Get.lazyPut(() => CurrencyController(database), fenix: true);
Get.put(MainAccountController(), permanent: true);
Get.put(ArchiveSubAccountController(database));
Get.put(ThemeController(), permanent: true);
Get.put(TotalOperationsController());
Get.put(UserSerialsController(database));
Get.put(SerialController());
Get.put(PreviousEntriesController());

Get.put(FieldSettingsController());
runApp(MyApp());
}
and i made this schema

This "input" configures a global authorization rule to enable public access to

all models in this schema. Learn more about authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules

input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } # FOR TESTING ONLY!

type Blog @model {
id: ID!
name: String!
posts: [Post] @hasmany
}

type Post @model {
id: ID!
title: String!
blog: Blog @belongsTo
comments: [Comment] @hasmany
}

type Comment @model {
id: ID!
post: Post @belongsTo
content: String!
}

Input for global authorization (optional)

input AMPLIFY { globalAuthRule: AuthRule = { allow: public } }

MainAccount-related models

type MainAccount @model {
id: ID!
mainAccountName: String!
userName: String
details: String
icon: String
defaultCurrency: String
isDeleted: Int!
subAccounts: [SubAccount] @hasmany(fields: ["id"])
}

type SubAccount @model {
id: ID!
mainAccountId: ID!
mainAccount: MainAccount @belongsTo(fields: ["mainAccountId"])
subAccountName: String!
defaultCurrency: String
userName: String
image: String
phoneNumber: String
whatsAppNumber: String
address: String
note: String
messagingWay: MessagingWay
messagingType: MessagingType
isDeleted: Int!
debtOperations: [DebtOperation] @hasmany(fields: ["id"])
}

enum MessagingWay {
sms
whats
}

enum MessagingType {
directly
assurance
never
}

type DebtOperation @model {
id: ID!
subAccountId: ID!
subAccount: SubAccount @belongsTo(fields: ["subAccountId"])
userName: String
moneyAmount: Float!
wholeSaleAmount: String
retailAmount: String
currency: String!
details: String
operationType: OperationType
screenClosed: ScreenClosed
addDateTime: AWSDateTime!
isDeleted: Int
}

enum OperationType {
ALIH
LAHU
}

enum ScreenClosed {
yes
no
}

note : i didnot write any custom code for sync i relayed on the auto sync provided by amplify with appsync
as i told you in debug release not thing happens every thing goes great but in apk or product release the issue happaned
and this what made me confuse

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Nov 26, 2024
@ekjotmultani
Copy link
Member

Thanks @Technical-Team-4Dev, we will investigate and return when we have an update!

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Nov 26, 2024
@ekjotmultani ekjotmultani self-assigned this Dec 3, 2024
@ekjotmultani ekjotmultani added the question A question about the Amplify Flutter libraries label Dec 3, 2024
@github-actions github-actions bot removed the pending-triage This issue is in the backlog of issues to triage label Dec 3, 2024
@ekjotmultani
Copy link
Member

Hello @Technical-Team-4Dev, I haven't been able to reproduce the initial issue about the cycling locks acquisition and release. Could you provide where the dispatched event is being captured in your code? About the issue with the datastore problem and the issue only appearing in a release, are you following the documentation for deployment of an Amplify app?

@NikaHsn NikaHsn added not-reproducible Issues that cannot be reproduced using the steps provided and removed to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided labels Dec 3, 2024
@Technical-Team-4Dev
Copy link
Author

Hi Bro @ekjotmultani , i got the issue it was because of mis configuration in amplify so it was solved after i reconfigure the amplify again and whole resources so thanks alot and forgive me that i didnot tell you in the time of configuration success it was just last night

@github-actions github-actions bot added the pending-maintainer-response Pending response from a maintainer of this repository label Dec 4, 2024
@ekjotmultani
Copy link
Member

Hey @Technical-Team-4Dev, no problem at all, I'm glad to see that it worked out. I'll go ahead and close this issue now then, feel free to raise another issue should something you believe requires it comes up.

@github-actions github-actions bot removed the pending-maintainer-response Pending response from a maintainer of this repository label Dec 4, 2024
Copy link

github-actions bot commented Dec 4, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datastore Issues related to the DataStore Category not-reproducible Issues that cannot be reproduced using the steps provided question A question about the Amplify Flutter libraries
Projects
None yet
Development

No branches or pull requests

3 participants