cboard icon indicating copy to clipboard operation
cboard copied to clipboard

"Wrong email or password" error.

Open gonojuarez opened this issue 8 months ago • 21 comments

How To Reproduce

  1. Navigate to the Login Screen
  2. Tap the Login Button
  3. In the Login Dialogue:
  • Enter a valid email address in the "Email" field.
  • Enter an incorrect password in the "Password" field.
  1. Tap the Login button.
  2. Observe the system displaying the error message: "Wrong email or password".
  3. Tap the cancel button, and the dialogue dismisses.
  4. Tap the Login Button again.
  5. The system shows the dialogue message "Wrong email or password"

Expected Result:

The "Wrong email or password" error message should not be displayed again immediately.

The application should either: Attempt a new login with the existing (incorrect) credentials. Clear the error state and allow the user to enter new credentials without the error message reappearing. Actual Result:

The "Wrong email or password" error message is displayed again immediately, even though the user has not yet entered new credentials.

Image

gonojuarez avatar Apr 29 '25 20:04 gonojuarez

Hi! I’d love to help resolve the error message persistence issue.

Proposed Approach:

Reset the error state when the login dialog closes to prevent the message from reappearing unnecessarily.

Ensure the error only displays after new credentials are submitted.

I can implement this by modifying the dialog’s state management logic

Aden1ke avatar Apr 29 '25 23:04 Aden1ke

Hi @Aden1ke

Welcome to CBOARD. We are glad to have your help with this project.

Please check the following folder

'cboard/src/components/Account/Login'

Login action and Login component are the files. Login.action contains the logic, and "Login.component" includes the design.

gonojuarez avatar May 02 '25 19:05 gonojuarez

Hello @gonojuarez , Sorry for the delay in replying. I'm currently facing an issue with the development mode,the localhost opens, but the app doesn't run. I'm working on figuring out the problem.

Aden1ke avatar May 12 '25 08:05 Aden1ke

@Aden1ke, run the following commands to download the app: to download the packages: yarn after that : yarn start The local host project should be run with this command.

When you arrive at the login page, you must use the cboard-api to run the login functions. Check only the logic that receives the message, and when it changes without the API.

Let us know if you can run it without that.

gonojuarez avatar May 12 '25 13:05 gonojuarez

I did just this, the yarn start opened a local host page. But the page is not working, I want to check if it is from my end

Aden1ke avatar May 12 '25 19:05 Aden1ke

@Aden1ke can you check the message in the console?

gonojuarez avatar May 12 '25 19:05 gonojuarez

Image

It shows this at first but goes ahead to open local host automatically, but the local page it opens does not load

Aden1ke avatar May 13 '25 20:05 Aden1ke

@Aden1ke run the command

 npx update-browserslist-db@latest

gonojuarez avatar May 13 '25 21:05 gonojuarez

Hello,

I have tried it, it's not going I even had to make research. I am not sure why?

Aden1ke avatar May 15 '25 14:05 Aden1ke

@Aden1ke I will try to download it in a new fork and complete the steps to guide and run it.

gonojuarez avatar May 15 '25 16:05 gonojuarez

Hello @Aden1ke welcome to the Cboard project. I need more information about your problem to be able to help you. My terminal shows:

PS C:\Users\rodri\CBOARD\cboard> yarn start
yarn run v1.22.19
$ craco start
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
(node:6200) [DEP_WEBPACK_DEV_SERVER_ON_AFTER_SETUP_MIDDLEWARE] DeprecationWarning: 'onAfterSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:6200) [DEP_WEBPACK_DEV_SERVER_ON_BEFORE_SETUP_MIDDLEWARE] DeprecationWarning: 'onBeforeSetupMiddleware' option is deprecated. Please use the 'setupMiddlewares' option.
Starting the development server...
Compiled successfully!

You can now view cboard in the browser.

  Local:            http://localhost:3000
  On Your Network:  http://192.168.56.1:3000

Note that the development build is not optimized.
To create a production build, use yarn build.

webpack compiled successfully
Files successfully emitted, waiting for typecheck results...
Issues checking in progress...
No issues found.

Please double check if you have the same logs. Also please share the web console logs

RodriSanchez1 avatar May 15 '25 20:05 RodriSanchez1

I will appreciate that, thank you.

Sorry for the trouble

Aden1ke avatar May 15 '25 21:05 Aden1ke

Image Image

It starts development, automatically opens localhost but never loads it finish or tell me successful

Aden1ke avatar May 15 '25 21:05 Aden1ke

Okay! Send me a message on Discord! .rodrisanchez or send on the dev thread of Cboard Discord

RodriSanchez1 avatar May 15 '25 22:05 RodriSanchez1

Message sent

Aden1ke avatar May 16 '25 12:05 Aden1ke

Hello , I’m interested in working on this issue.
I’d love to contribute — could you please assign it to me?

suryavamsi1729 avatar Jun 11 '25 06:06 suryavamsi1729

Hi! @suryavamsi1729 Welcome to the Cboard project!

Sure thing! I will assing it to you

RodriSanchez1 avatar Jun 11 '25 14:06 RodriSanchez1

@RodriSanchez1 I have a solution for this and can put up a PR. Also the same issue exists for ResetPassword, and the solution is the same. Would you consider expanding the scope here?

https://github.com/user-attachments/assets/11efbccf-431b-40b6-a9f5-55d99b13f359

cc @tomivm

zkarmi avatar Jun 17 '25 20:06 zkarmi

@zkarmi Sure thing! I will assign it to you. Be free to expand the scope

EDIT: As tomi said on the Discord channel. We normally we prefer to have the PRs much "atomic" as possible With the objetive to review the minimum changes necessaries to have a fast integration and easy reverts

Take that on mind. If you consider that is possible two solve the issue in two different atomics PR let do that, if not create just one PR.

RodriSanchez1 avatar Jun 17 '25 22:06 RodriSanchez1

@RodriSanchez1 Thank you for assigning. The issue is that in the Login and ResetPassword components the loginStatus and forgotState state variables are not reset when the Dialog is closed because the handler only calls WelcomeScreen.resetActiveView, which simply sets the Dialog components' open prop to false. The Login and ResetPassword components themselves don't unmount, so the errors are never cleared.

Fortunately, the SignUp component already uses componentDidMount to reset the error state if the dialog goes from closed to open: https://github.com/cboard-org/cboard/blob/2824ecf9f7749a5fe55a5af39dce66b2675663ac/src/components/Account/SignUp/SignUp.component.js#L40-L44 My plan is to replicate the behavior for the Login and ResetPassword components. I can do two PRs, one for each. For a more readable/DRY implementation, we can extract the logic into a helper, if you have a recommendation where that could live.

zkarmi avatar Jun 18 '25 07:06 zkarmi

That's awesome!

Since these are all small changes, it would be easier if you could include them in the same PR. Let’s also keep things simple and handle the logic directly in componentDidUpdate, without introducing a separate helper for now.

Thanks a lot for your contributions

RodriSanchez1 avatar Jun 18 '25 20:06 RodriSanchez1