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

[Bug]: resetWidget function causes the next async method to be undefined #33601

Closed
1 task done
rishabhrathod01 opened this issue May 20, 2024 · 0 comments · Fixed by #33600
Closed
1 task done

[Bug]: resetWidget function causes the next async method to be undefined #33601

rishabhrathod01 opened this issue May 20, 2024 · 0 comments · Fixed by #33600
Assignees
Labels
Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Product Issues related to a specific integration Javascript Product Issues related to users writing javascript in appsmith JS Evaluation Issues related to JS evaluation on the platform Needs Triaging Needs attention from maintainers to triage QA Pod Issues under the QA Pod QA Needs QA attention Query & JS Pod Issues related to the query & JS Pod

Comments

@rishabhrathod01
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Description

This was reported as an A-force issue.

Steps To Reproduce

  1. Add a resetWidget function
  2. Add a API call function after that
  3. Run the function and check

Public Sample App

No response

Environment

Production

Severity

Medium (Frustrating UX)

Issue video log

No response

Version

1.24

@rishabhrathod01 rishabhrathod01 added Bug Something isn't working Needs Triaging Needs attention from maintainers to triage labels May 20, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added Medium Issues that frustrate users due to poor UX Production labels May 20, 2024
@rishabhrathod01 rishabhrathod01 added JS Evaluation Issues related to JS evaluation on the platform Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. and removed Production Medium Issues that frustrate users due to poor UX labels May 20, 2024
@github-actions github-actions bot added the Javascript Product Issues related to users writing javascript in appsmith label May 20, 2024
@rishabhrathod01 rishabhrathod01 self-assigned this May 20, 2024
@github-actions github-actions bot added the Integrations Product Issues related to a specific integration label May 20, 2024
@Nikhil-Nandagopal Nikhil-Nandagopal added the High This issue blocks a user from building or impacts a lot of users label May 21, 2024
@github-actions github-actions bot added the Query & JS Pod Issues related to the query & JS Pod label May 21, 2024
rishabhrathod01 pushed a commit that referenced this issue May 21, 2024
#33600)

## Description

Fixed the error of async function like `Api.run` being `undefined` after
running `resetWidget`.

#### Context:-
we have 2 types of evaluation i.e., sync and async evaluation.

These are dependent on the field we are evaluating, for the data field
we use sync evaluation and for the trigger field, we use async
evaluation. In Async evaluation, we also define entity functions like
`Api.run`.
- In resetWidget code, internally we were switching to sync evaluation
and we forgot to add code to switch back to async and due to this code
that was after it was throwing an `undefined` error.


Fixes #33601

### Steps to reproduce 

1. Import user’s application ( shared on slack )
2. Go to JSObj_Main JSObject
3. Check the onClickCopySheetTemplate function 
4. Comment the await Qry_C_CopySheetTemplate.run(); line and run the
function.
5. On release it will throw error for Qry_R_SheetTemplate.run(); not
being defined but will work fine on DP.

## Automation

/ok-to-test tags="@tag.JS"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9170093222>
> Commit: f9e8893
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9170093222&attempt=1"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->








## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No
@appsmith-bot appsmith-bot added the QA Needs QA attention label May 21, 2024
@github-actions github-actions bot added the QA Pod Issues under the QA Pod label May 21, 2024
sagar-qa007 added a commit that referenced this issue Dec 19, 2024
## Description
Automation for Bug: #33601


Fixes #[`Issue Number`
](#38071)

## Automation

/ok-to-test tags="@tag.JS"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12396301697>
> Commit: ddb795c
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12396301697&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS`
> Spec:
> <hr>Wed, 18 Dec 2024 16:25:55 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new test case to validate the functionality of the
`resetWidget` feature.
- Added a structured JSON file representing an application configuration
with various attributes and actions.

- **Bug Fixes**
- Implemented a test to address Bug 33601 related to the `resetWidget`
function.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
NandanAnantharamu pushed a commit that referenced this issue Dec 27, 2024
## Description
Automation for Bug: #33601


Fixes #[`Issue Number`
](#38071)

## Automation

/ok-to-test tags="@tag.JS"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/12396301697>
> Commit: ddb795c
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12396301697&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JS`
> Spec:
> <hr>Wed, 18 Dec 2024 16:25:55 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced a new test case to validate the functionality of the
`resetWidget` feature.
- Added a structured JSON file representing an application configuration
with various attributes and actions.

- **Bug Fixes**
- Implemented a test to address Bug 33601 related to the `resetWidget`
function.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working High This issue blocks a user from building or impacts a lot of users Integrations Pod General Issues related to the Integrations Pod that don't fit into other tags. Integrations Product Issues related to a specific integration Javascript Product Issues related to users writing javascript in appsmith JS Evaluation Issues related to JS evaluation on the platform Needs Triaging Needs attention from maintainers to triage QA Pod Issues under the QA Pod QA Needs QA attention Query & JS Pod Issues related to the query & JS Pod
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants