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

Update ischool login method with retry mechanism #225

Merged
merged 25 commits into from
Feb 28, 2024

Conversation

James-Lu-none
Copy link
Collaborator

@James-Lu-none James-Lu-none commented Feb 16, 2024

Description

  • add retry mechanism on ischool login method.

Implementation

sso index retiving process

  • process will retry on sso index retriving failure.

redirection process

  • process will retry when redirection was not introduced (status code != 302)
  • process will retry when connection loss to ischool

Testing Instructions

Please provide details on the steps required to review and test this PR.

  • try features related to ischool campus or run ischool_plus_connector_test.dart

Additional Notes

i haven't got any error during the tests that i perform in the development, so please try the login methods as much as you can in order to provide more information for error handling or optimizing retry mechanism, and the error handling might be performed by expending ISchoolPlusConnectorStatus status.

Copy link
Member

@rileychh rileychh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A warning "This course does not support queries" whenever querying for announcements of any course. Debug output:

[TAT (core) _SimpleLoginRepositoryImpl simpleLoginWithCredential fetchInitialJSessionIdCookie] Initial JSESSIONID have tried to get.
E/FA      (14508): Name is reserved. Type, name: user property, user_id
[TAT (core) _SimpleLoginRepositoryImpl simpleLoginWithCredential SimpleLoginResultDto.fromJson] SimpleLoginResultDto created.
E/ub.ntut.npc.tat(14508): PIXEL: ioctl err: 1
[TAT (core) _CheckSessionRepositoryImpl isValidSession fetch checkSession] Fetched session status: {
  "success" : true
}

[TAT (core) _CheckSessionRepositoryImpl isValidSession verify "true" in data] Is the session response data contains "true": true
I/flutter (14508): ----------------FIREBASE CRASHLYTICS----------------
I/flutter (14508): NoSuchMethodError: The method 'getElementsByTagName' was called on null.
I/flutter (14508): Receiver: null
I/flutter (14508): Tried calling: getElementsByTagName("option")
I/flutter (14508): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
I/flutter (14508): #1      ISchoolPlusConnector._selectCourse (package:flutter_app/src/connector/ischool_plus_connector.dart:494:20)
I/flutter (14508): <asynchronous suspension>
I/flutter (14508): #2      ISchoolPlusConnector.getCourseAnnouncement (package:flutter_app/src/connector/ischool_plus_connector.dart:258:12)
I/flutter (14508): <asynchronous suspension>
I/flutter (14508): #3      IPlusCourseAnnouncementTask.execute (package:flutter_app/src/task/iplus/iplus_course_announcement_task.dart:22:21)
I/flutter (14508): <asynchronous suspension>
I/flutter (14508): #4      TaskFlow.start (package:flutter_app/src/task/task_flow.dart:52:22)
I/flutter (14508): <asynchronous suspension>
I/flutter (14508): #5      _IPlusAnnouncementPage._addTask (package:flutter_app/ui/pages/coursedetail/screen/ischoolplus/iplus_announcement_page.dart:50:9)
I/flutter (14508): <asynchronous suspension>

lib/src/connector/ischool_plus_connector.dart Outdated Show resolved Hide resolved
lib/src/connector/ischool_plus_connector.dart Outdated Show resolved Hide resolved
lib/src/connector/ischool_plus_connector.dart Outdated Show resolved Hide resolved
lib/src/connector/ischool_plus_connector.dart Outdated Show resolved Hide resolved
@James-Lu-none James-Lu-none changed the title Update ischool login method with retry Update ischool login method with retry machanism Feb 19, 2024
@James-Lu-none James-Lu-none changed the title Update ischool login method with retry machanism Update ischool login method with retry mechanism Feb 19, 2024
ntut-xuan
ntut-xuan previously approved these changes Feb 28, 2024
Copy link
Collaborator

@ntut-xuan ntut-xuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IWOMM.

Copy link
Collaborator

@ntut-xuan ntut-xuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IWOMM.

@ntut-xuan ntut-xuan dismissed rileychh’s stale review February 28, 2024 15:37

Since the review is 2 weeks ago and no further response, dismiss it.

@ntut-xuan ntut-xuan merged commit 3bf8666 into master Feb 28, 2024
4 checks passed
@ntut-xuan ntut-xuan deleted the update_ischool_login_method_with_retry branch February 28, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants