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

RangeError on short password Length #6

Closed
seikosantana opened this issue Jun 22, 2022 · 4 comments
Closed

RangeError on short password Length #6

seikosantana opened this issue Jun 22, 2022 · 4 comments

Comments

@seikosantana
Copy link

seikosantana commented Jun 22, 2022

I tried using a 3-characters password and it throws the range error.
image

If the password is long enough, the error is not thrown. I haven't tried how many characters in maximum that could cause the error.

E/flutter ( 5454): [ERROR:flutter/runtime/dart_isolate.cc(1098)] Unhandled exception:
E/flutter ( 5454): RangeError: Invalid value: Not in inclusive range 0..72: 75
E/flutter ( 5454): #0      List.insertAll (dart:core-patch/growable_array.dart:44:7)
E/flutter ( 5454): #1      EspTouch._dataCodes.<anonymous closure> (package:esp_smartconfig/src/protocols/esptouch.dart:58:17)
E/flutter ( 5454): #2      _IntListMixin.forEach (dart:typed_data-patch/typed_data_patch.dart:215:8)
E/flutter ( 5454): #3      EspTouch._dataCodes (package:esp_smartconfig/src/protocols/esptouch.dart:57:19)
E/flutter ( 5454): #4      EspTouch.prepare (package:esp_smartconfig/src/protocols/esptouch.dart:27:19)
E/flutter ( 5454): #5      Provisioner._startProvisioning (package:esp_smartconfig/src/provisioner.dart:199:9)
E/flutter ( 5454): <asynchronous suspension>
@abobija
Copy link
Owner

abobija commented Aug 3, 2022

Hi @seikosantana, thanks for the feedback and sorry for the late reply, but I'm wondering how did you even managed to set WiFi password on your router that is shorter than 8 characters, because according to WPA/WPA2 specs, the minimum length of WiFi password is 8 chars.

@abobija abobija mentioned this issue Aug 5, 2022
@abobija
Copy link
Owner

abobija commented Aug 9, 2022

Closed due no activity.

@abobija abobija closed this as not planned Won't fix, can't repro, duplicate, stale Aug 9, 2022
@seikosantana
Copy link
Author

seikosantana commented Aug 10, 2022

Hi,

Sorry I was away for a while.
Back then I didn't remember the minimum length of WiFi password and wasn't aware at that moment. Later I had figured that out so I did set the minimum length of WIFi password on the UI part before starting provision.

But anyway, I probably will suggest that the error message is throws is more specific to the minimum length of WiFi password so it gives better clue of the mistake. Thanks for your effort on this awesome library!

@abobija
Copy link
Owner

abobija commented Aug 10, 2022

Thanks @seikosantana
For sure I will add more descriptive error message for password length. Thanks for feedback.

Edit:
Checking for the password min length is done and it is published in new version (1.1.5) version of esp_smartconfig package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants