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

fix: Dashboard may display blank page when selecting an app after login #2375

Merged
merged 5 commits into from
Jan 28, 2023

Conversation

dblythy
Copy link
Member

@dblythy dblythy commented Jan 27, 2023

New Pull Request Checklist

Issue Description

Related: #2374

Approach

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)

@parse-github-assistant
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title fix: invalid redirect can return invalid response fix: Invalid redirect can return invalid response Jan 27, 2023
@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 27, 2023

Thanks for opening this pull request!

  • ❌ Please link an issue that describes the reason for this pull request, otherwise your pull request will be closed. Make sure to write it as Closes: #123 in the PR description, so I can recognize it.

@dblythy
Copy link
Member Author

dblythy commented Jan 27, 2023

I think this should fix #2374 (comment)

@uffizzi-cloud
Copy link

uffizzi-cloud bot commented Jan 27, 2023

This branch has been deployed using Uffizzi.

Preview URL:
https://pr-2375-deployment-12559-parse-dashboard.app.uffizzi.com

View deployment details here:
https://https://app.uffizzi.com/projects/5259/deployments

This is an automated comment. To turn off commenting, visit uffizzi.com.

@dblythy dblythy closed this Jan 28, 2023
@dblythy dblythy reopened this Jan 28, 2023
@dblythy
Copy link
Member Author

dblythy commented Jan 28, 2023

Does the pr preview auto-update when new commits are pushed? I'm not sure it does, as the dashboard has retained login between commits

@uffizzi-cloud
Copy link

uffizzi-cloud bot commented Jan 28, 2023

This branch has been deployed using Uffizzi.

Preview URL:
https://pr-2375-deployment-12561-parse-dashboard.app.uffizzi.com

View deployment details here:
https://https://app.uffizzi.com/projects/5259/deployments

This is an automated comment. To turn off commenting, visit uffizzi.com.

@mtrezza
Copy link
Member

mtrezza commented Jan 28, 2023

Yes it should, but it takes a while.

@dblythy
Copy link
Member Author

dblythy commented Jan 28, 2023

Do you have any tips for debugging? Seems to work fine locally but getting this error on the preview

Screen Shot 2023-01-28 at 11 50 15 am

@mtrezza
Copy link
Member

mtrezza commented Jan 28, 2023

I think it has something to do with the URL in the browser that is parsed there? What you could do it output the value to the browser JS console that should be split so you see what value is causing this. My shot in the dark here is that it has something to do with the URL https://pr-2375-deployment-12561-parse-dashboard.app.uffizzi.com/, but that's just a guess.

@mtrezza mtrezza mentioned this pull request Jan 28, 2023
3 tasks
@mtrezza
Copy link
Member

mtrezza commented Jan 28, 2023

I think you are right, you may have to close and re-open the PR to redeploy the preview, then it takes about 15 mins.

@mtrezza mtrezza closed this Jan 28, 2023
@mtrezza mtrezza reopened this Jan 28, 2023
@uffizzi-cloud
Copy link

uffizzi-cloud bot commented Jan 28, 2023

This branch has been deployed using Uffizzi.

Preview URL:
https://pr-2375-deployment-12562-parse-dashboard.app.uffizzi.com

View deployment details here:
https://https://app.uffizzi.com/projects/5259/deployments

This is an automated comment. To turn off commenting, visit uffizzi.com.

@mtrezza
Copy link
Member

mtrezza commented Jan 28, 2023

Here's the issue:

const appId = 'parse';
const path = '/apps/MyParseApp/browser';
const route = path.split(appId)[1].split('/')[1]; // throws because path.split(appId)[1] == undefined

Is this a misconfiguration of the dashboard?

Btw I'm not sure the route logic works in all cases, for example if appId is apps like:
apps/apps/browser/_Installation

@ShrutiC-git
Copy link
Contributor

hey @mtrezza @dblythy ~

The previews should be updated (without having to close and reopen the PR) as you push commits to that open PR. It could be the case that @dblythy you were seeing a cached version of the preview..?

Once commits are pushed to the PR, this triggers build and deploy again — so the preview gets updated, or you'll have a new preview in case the old one was deleted/expired.

Was the Uffizzi CI console unable to help here? Ideally, as the containers get rebuilt, the Uffizzi CI will indicate that the containers are building and when the preview was last updated. Were you all not seeing that?

@dblythy dblythy closed this Jan 28, 2023
@dblythy dblythy reopened this Jan 28, 2023
@uffizzi-cloud
Copy link

uffizzi-cloud bot commented Jan 28, 2023

This branch has been deployed using Uffizzi.

Preview URL:
https://pr-2375-deployment-12572-parse-dashboard.app.uffizzi.com

View deployment details here:
https://https://app.uffizzi.com/projects/5259/deployments

This is an automated comment. To turn off commenting, visit uffizzi.com.

@dblythy dblythy requested a review from a team January 28, 2023 05:17
@dblythy
Copy link
Member Author

dblythy commented Jan 28, 2023

I had to close and re-open, I tried clearing cache and reloading and didn't work.

This is ready for review

@ShrutiC-git
Copy link
Contributor

thanks for letting me know, @dblythy.
The desired behavior is the preview gets updated with new commits. It could be a configuration issue. I'll take a look into what's going on.

@gadkins
Copy link

gadkins commented Jan 28, 2023

@dblythy @mtrezza

Let me clarify Uffizzi behavior:

  • You do not need to close and reopen PRs every time you push a new commit
  • Uffizzi is receiving webhooks on every commit, so it will rebuild your application each time.
  • Each time it rebuilds a new commit, it will preserve the state from the previous build if volumes are mounted in the compose. This tells Uffizzi to preserve this data as long as this PR is open.
  • If you close a PR, Uffizzi will destroy the preview and all its state. If you reopen the PR, you will get an fresh environment with empty volumes and a new comment.
  • On new commits, Uffizzi will update the existing comment on the PR. It will not post a new comment. The multiple comments you are seeing are caused by opening and closing the PR several times.
  • You can see which commit is deployed in the Uffizzi Dashboard, along with the timestamp:

Screen Shot 2023-01-27 at 11 35 52 PM

@mtrezza
Copy link
Member

mtrezza commented Jan 28, 2023

I've opened #2374 to discuss the Uffizzi integration. Let's try to keep the discussion there, to keep this topic consolidated and make it easier for others to follow. I will respond there.

@mtrezza mtrezza closed this Jan 28, 2023
@mtrezza mtrezza reopened this Jan 28, 2023
@uffizzi-cloud
Copy link

uffizzi-cloud bot commented Jan 28, 2023

This branch has been deployed using Uffizzi.

Preview URL:
https://pr-2375-deployment-12592-parse-dashboard.app.uffizzi.com

View deployment details here:
https://https://app.uffizzi.com/projects/5259/deployments

This is an automated comment. To turn off commenting, visit uffizzi.com.

Copy link
Member

@mtrezza mtrezza left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the quick fix.

@mtrezza mtrezza changed the title fix: Invalid redirect can return invalid response fix: Dashboard may display blank page when selecting an app after login Jan 28, 2023
@mtrezza mtrezza merged commit f399b91 into parse-community:alpha Jan 28, 2023
parseplatformorg pushed a commit that referenced this pull request Jan 28, 2023
# [5.1.0-alpha.7](5.1.0-alpha.6...5.1.0-alpha.7) (2023-01-28)

### Bug Fixes

* Dashboard may display blank page when selecting an app after login ([#2375](#2375)) ([f399b91](f399b91))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.1.0-alpha.7

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Jan 28, 2023
@dblythy dblythy deleted the fix-redirect branch January 28, 2023 21:27
parseplatformorg pushed a commit that referenced this pull request Mar 1, 2023
# [5.1.0-beta.2](5.1.0-beta.1...5.1.0-beta.2) (2023-03-01)

### Bug Fixes

* Add dashboard option `cookieSessionMaxAge` to keep user logged in across browser sessions ([#2366](#2366)) ([9ea95fc](9ea95fc))
* Blank screen shown if server is unreachable; unsupported pages are accessible via direct URLs ([#2363](#2363)) ([9855258](9855258))
* Dashboard may display blank page when selecting an app after login ([#2375](#2375)) ([f399b91](f399b91))
* Data browser dialog "No data to display" may be outside of visible area in Safari browser ([#2387](#2387)) ([52bba62](52bba62))
* Internal error message on login with missing credential ([#2370](#2370)) ([9a6a31f](9a6a31f))
* Navigation to page fails if user re-login is required ([#2369](#2369)) ([0db6f55](0db6f55))
* Screen goes blank when trying to add column of type `Object` or `GeoPoint` ([#2384](#2384)) ([0886386](0886386))
* Text selection not visible in modal dialog header ([#2340](#2340)) ([fb0e79c](fb0e79c))

### Features

* Add export all rows of a class and export in JSON format ([#2361](#2361)) ([9eb36a1](9eb36a1))
* Add schema export ([#2362](#2362)) ([33df049](33df049))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.1.0-beta.2

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Mar 1, 2023
parseplatformorg pushed a commit that referenced this pull request May 1, 2023
# [5.1.0](5.0.0...5.1.0) (2023-05-01)

### Bug Fixes

* Add dashboard option `cookieSessionMaxAge` to keep user logged in across browser sessions ([#2366](#2366)) ([9ea95fc](9ea95fc))
* Blank screen shown if server is unreachable; unsupported pages are accessible via direct URLs ([#2363](#2363)) ([9855258](9855258))
* Dashboard may display blank page when selecting an app after login ([#2375](#2375)) ([f399b91](f399b91))
* Data browser dialog "No data to display" may be outside of visible area in Safari browser ([#2387](#2387)) ([52bba62](52bba62))
* Internal error message on login with missing credential ([#2370](#2370)) ([9a6a31f](9a6a31f))
* Navigation to page fails if user re-login is required ([#2369](#2369)) ([0db6f55](0db6f55))
* Screen goes blank when trying to add column of type `Object` or `GeoPoint` ([#2384](#2384)) ([0886386](0886386))
* Text selection not visible in modal dialog header ([#2340](#2340)) ([fb0e79c](fb0e79c))

### Features

* Add export all rows of a class and export in JSON format ([#2361](#2361)) ([9eb36a1](9eb36a1))
* Add schema export ([#2362](#2362)) ([33df049](33df049))
* remove limitation to refresh Cloud Jobs list only after 30 seconds ([#2332](#2332)) ([ad1132f](ad1132f))
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 5.1.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label May 1, 2023
beiguancyc pushed a commit to beiguancyc/parse-dashboard that referenced this pull request May 5, 2023
* source: (41 commits)
  chore(release): 5.1.0 [skip ci]
  chore(release): 5.1.0-beta.2 [skip ci]
  ci: Skip unnecessary builds (parse-community#2389)
  refactor: Upgrade various dependencies (parse-community#2388)
  chore(release): 5.1.0-alpha.10 [skip ci]
  fix: Data browser dialog "No data to display" may be outside of visible area in Safari browser (parse-community#2387)
  chore(release): 5.1.0-alpha.9 [skip ci]
  fix: Screen goes blank when trying to add column of type `Object` or `GeoPoint` (parse-community#2384)
  refactor: Bump http-cache-semantics from 4.1.0 to 4.1.1 (parse-community#2381)
  chore(release): 5.1.0-alpha.8 [skip ci]
  fix: Internal error message on login with missing credential (parse-community#2370)
  refactor: Remove warnings in Docker build (parse-community#2350)
  ci: Restyle preview html (parse-community#2377)
  chore(release): 5.1.0-alpha.7 [skip ci]
  fix: Dashboard may display blank page when selecting an app after login (parse-community#2375)
  ci: Add deployment preview to pull requests via Uffizzi integration (parse-community#2364)
  chore(release): 5.1.0-alpha.6 [skip ci]
  fix: Navigation to page fails if user re-login is required (parse-community#2369)
  refactor: Bump ua-parser-js from 0.7.28 to 0.7.33 (parse-community#2372)
  chore(release): 5.1.0-alpha.5 [skip ci]
  ...

# Conflicts:
#	package-lock.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants