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

Building with at_onboarding_flutter results in cryptic error #300

Closed
cconstab opened this issue Dec 20, 2021 · 17 comments
Closed

Building with at_onboarding_flutter results in cryptic error #300

cconstab opened this issue Dec 20, 2021 · 17 comments
Labels
3 SP 3 Story Points - 1 Day Small bug Something isn't working Fixed Bug fixed by the developer P1 Priority 1 unplanned Unplanned work mid-sprint plan

Comments

@cconstab
Copy link
Member

cconstab commented Dec 20, 2021

Describe the bug
Error given when building from clean installation

PS S:\TEMP\test32> flutter run
Multiple devices found:
Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
Android SDK built for x86 (mobile) • emulator-5556 • android-x86 • Android 10 (API 29) (emulator)
Android SDK built for x86 (mobile) • emulator-5558 • android-x86 • Android 10 (API 29) (emulator)
Windows (desktop)                  • windows       • windows-x64 • Microsoft Windows [Version 10.0.22000.376]
[1]: Android SDK built for x86 (emulator-5554)
[2]: Android SDK built for x86 (emulator-5556)
[3]: Android SDK built for x86 (emulator-5558)
[4]: Windows (windows)
Please choose one (To quit, press "q/Q"): 1
Using hardware rendering with device Android SDK built for x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on Android SDK built for x86 in debug mode...
/C:/Users/colin/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/at_onboarding_flutter-3.1.1/lib/services/onboarding_service.dart:216:58: Error: Member not found: 'ONDEMAND'.
    if (_atClientPreference.syncStrategy == SyncStrategy.ONDEMAND) {
                                                         ^^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script 'C:\tools\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1070

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\tools\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 14s
Running Gradle task 'assembleDebug'...                             15.8s
Exception: Gradle task assembleDebug failed with exit code 1
PS S:\TEMP\test32

To Reproduce
Steps to reproduce the behavior:

  1. Build an application using the at_onboarding_flutter package
  2. First clean your cache `flutter pub cache clean'
  3. Then flutter run
  4. See the error.
  5. Error seems to be on line 216 of at_onboarding_flutter-3.1.1\lib\services\onboarding_service.dart

if (_atClientPreference.syncStrategy == SyncStrategy.ONDEMAND) {

should read I think

if (_atClientPreference.syncStrategy == SyncStrategy.onDemand) {

Expected behavior
Should build cleanly

Additional context
Add any other context about the problem here.

@cconstab cconstab added bug Something isn't working P1 Priority 1 labels Dec 20, 2021
@XavierChanth
Copy link
Member

Changes to at_client need to be propagated to our other packages.

@cconstab
Copy link
Member Author

Added a few other players to the ticket as this feels like something we need to catch in builds/tests..

@cconstab cconstab self-assigned this Dec 20, 2021
@gkc
Copy link
Contributor

gkc commented Dec 20, 2021 via email

@gkc
Copy link
Contributor

gkc commented Dec 20, 2021 via email

@gkc
Copy link
Contributor

gkc commented Dec 20, 2021

@murali-shris can you take a look please?

@gkc
Copy link
Contributor

gkc commented Dec 20, 2021

TIL : read issue on github rather than in my email

thanks Xavier for linking the pull request that made the changes

we’ve got two choices here:

  1. revert the breaking changes. Downsides: (a) downstream code may have already been changed to use the new const and enum names (b) we would be reverting to non-dart-standard naming

  2. update the code downstream - ie in all of the widgets etc

I prefer option 2, since this particular change has been in trunk for a while but what do others think?

@cconstab from a testing perspective what we’re missing is a way to detect breaking changes. (1) One way would be to try to build all dependent packages and apps. This seems… difficult and hokey. (2) A better alternative would be to have a set of client code in another package in the at_client_sdk repo which exists solely to exercise all of the public API, and have the GitHub workflow check that that package builds

@cconstab
Copy link
Member Author

@gkc Yes I like option 2 and is essentially how we came across the issue.. I suspect most developers rely on flutter pub get alone and rarely if ever clear cache and then rebuild.. This we clearly could do in a workflow.

@gkc
Copy link
Contributor

gkc commented Dec 21, 2021

First step - change at_onboarding_flutter to use the new SyncStrategy.onDemand rather than the old SyncStrategy.ONDEMAND

@murali-shris
Copy link
Member

@gkc I will make the fix and publish the minor version. Thank you

@murali-shris murali-shris added the unplanned Unplanned work mid-sprint plan label Dec 21, 2021
@murali-shris
Copy link
Member

https://github.com/atsign-foundation/at_widgets/search?q=SyncStrategy&type=code
A bunch of widgets have to be fixed and published

murali-shris added a commit that referenced this issue Dec 21, 2021
murali-shris added a commit that referenced this issue Dec 21, 2021
@gkc
Copy link
Contributor

gkc commented Dec 21, 2021

@murali-shris looking across all repos in atsign-foundation there are a few more references: https://github.com/search?q=org%3Aatsign-foundation+syncstrategy&type=code

@gkc
Copy link
Contributor

gkc commented Dec 21, 2021

@murali-shris I was going to make the changes in the at_login repo but I am having IDE problems ... please can you fix the issues in at_login repo? There's also a SyncStrategy reference in the at_libraries repo

@murali-shris
Copy link
Member

@murali-shris I was going to make the changes in the at_login repo but I am having IDE problems ... please can you fix the issues in at_login repo? There's also a SyncStrategy reference in the at_libraries repo

sure Gary

@murali-shris
Copy link
Member

murali-shris commented Dec 21, 2021

published at_onboarding_flutter 3.1.2

@murali-shris murali-shris added 3 SP 3 Story Points - 1 Day Small Fixed Bug fixed by the developer labels Dec 21, 2021
@murali-shris
Copy link
Member

code in other widgets will be fixed as a part of
#305

@cconstab
Copy link
Member Author

cconstab commented Jan 5, 2022

@murali-shris looks like this ticket can now be closed.. Do you agree ?

@murali-shris
Copy link
Member

@murali-shris looks like this ticket can now be closed.. Do you agree ?

yes @cconstab

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 SP 3 Story Points - 1 Day Small bug Something isn't working Fixed Bug fixed by the developer P1 Priority 1 unplanned Unplanned work mid-sprint plan
Projects
None yet
Development

No branches or pull requests

7 participants