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

When failed loading avatar, it will also prevent the player from loading #436

Closed
CKylinMC opened this issue Apr 13, 2024 · 6 comments
Closed

Comments

@CKylinMC
Copy link

CKylinMC commented Apr 13, 2024

Describe the bug

In web page, if requests of gravatar.com fail, it will prevent the player being shown until the error popup to console.

details:
I have problems with accessing gravatar.com, and asciinema using this for avatar. I found when I open a record page, it load very quickly, but no player here. I inspected it, I found when I blocked gravatar.com and refresh the page, it could load correctly.

To Reproduce
Steps to reproduce the behavior:

  1. (any way to simulate the access problem to gravatar.com)
  2. open any record page
  3. See error

Expected behavior
Loading avatar should not affect to player loading, or give a way (maybe an environment variable) to disable accessing the gravatar.com.

Screenshots
If applicable, add screenshots to help explain your problem.

image
image

Versions:

  • OS: Windows 11 23H2 22631.3155
  • Browser: Chrome 125.0.6396.3 dev
  • asciinema server: v240324

Additional context
Add any other context about the problem here.

@ku1ik
Copy link
Contributor

ku1ik commented Apr 29, 2024

The JS code doesn't depend on gravatar explicitly, but the player is initialized after the page is fully loaded, and probably this never happens when the gravatar requests never finish, causing this breakage.

I think a reasonable thing to do is to implement a config option (env var) to disable use of gravatar. This will require implementing a built-in (local) replacement, or providing a way for users to upload an image.

@CKylinMC
Copy link
Author

Seems Asciinema has only one external request, which is accessing Gravatar. I think maybe provide a config option like what @ku1ik said and replace avatar to a programmatically generated avatar from username (just like what GitHub and JetBrains did) is another choice and could make Asciinema fully-local usable.

@ku1ik
Copy link
Contributor

ku1ik commented May 9, 2024

I've implemented local avatar based on Identicons in #440 . This will be used by default in the next release, with ability to use Gravatar by setting env var.

I'm waiting with merging this until Isaak, author of https://github.com/waseigo/identicon_svg, releases a new version (I'd like to use the extra padding option with the identicons, which he recently implemented).

@CKylinMC
Copy link
Author

I'm waiting with merging this until Isaak, author of https://github.com/waseigo/identicon_svg, releases a new version (I'd like to use the extra padding option with the identicons, which he recently implemented).

I see identicon_svg just released a new version, does it included this feature?

@ku1ik
Copy link
Contributor

ku1ik commented Jun 18, 2024

Yes, and I already implemented this in #440, which is already merged. I plan to release a new version soon.

@ku1ik
Copy link
Contributor

ku1ik commented Jun 28, 2024

I just released new version of the server, with locally-generated identicon avatars used by default.

https://github.com/asciinema/asciinema-server/releases/tag/v20240627

@ku1ik ku1ik closed this as completed Jun 28, 2024
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