-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
URL preview shows error on JetBrains YouTrack links #14118
Comments
The source for that page<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<meta name="apple-itunes-app" content="app-id=1028024655">
<link rel="manifest" href="manifest.json">
<title rg-page-title delimiter="{{' – '}}" no-title="YouTrack"></title>
<base href="/">
<link rel="shortcut icon" href="static/favicon.ico?3c05e1a5b709165a5c4e825adf27273a?3c05e1a5b709165a5c4e825adf27273a" type="image/x-icon" sizes="16x16 32x32"/>
<link rel="apple-touch-icon" sizes="57x57" href="static/apple-touch-icon-57x57.png?553aad996d56c43a239de341e4d3a035?553aad996d56c43a239de341e4d3a035"/>
<link rel="apple-touch-icon" sizes="60x60" href="static/apple-touch-icon-60x60.png?b552ef159b72e314460e31281ae58d3e?b552ef159b72e314460e31281ae58d3e"/>
<link rel="apple-touch-icon" sizes="72x72" href="static/apple-touch-icon-72x72.png?868c75e482211f7eb5e00d514490cf82?868c75e482211f7eb5e00d514490cf82"/>
<link rel="apple-touch-icon" sizes="76x76" href="static/apple-touch-icon-76x76.png?301b4ee73db2aeb230c05ec4fb933854?301b4ee73db2aeb230c05ec4fb933854"/>
<link rel="apple-touch-icon" sizes="114x114" href="static/apple-touch-icon-114x114.png?f8577d12dd7080201e7fdc4233862a25?f8577d12dd7080201e7fdc4233862a25"/>
<link rel="apple-touch-icon" sizes="120x120" href="static/apple-touch-icon-120x120.png?8958600b1a617c6fd6ea2b54102aedc3?8958600b1a617c6fd6ea2b54102aedc3"/>
<link rel="apple-touch-icon" sizes="144x144" href="static/apple-touch-icon-144x144.png?6d3050fce562d6ca8fbefc8613b99a16?6d3050fce562d6ca8fbefc8613b99a16"/>
<link rel="apple-touch-icon" sizes="152x152" href="static/apple-touch-icon-152x152.png?588e3a4193375877258b650210748948?588e3a4193375877258b650210748948"/>
<link rel="apple-touch-icon" sizes="180x180" href="static/apple-touch-icon-180x180.png?8fd974abc28cce6ee4f816ab2fdc4ae1?8fd974abc28cce6ee4f816ab2fdc4ae1"/>
<link rel="mask-icon" href="static/apple-mask-icon.svg?68c959aed7d5ecb39cf1ea6c4c403ae5?68c959aed7d5ecb39cf1ea6c4c403ae5" color="black"/>
<meta name="msapplication-TileColor" content="#000000"/>
<meta name="msapplication-TileImage" content="static/mstile-144x144.png?acb8c9cfe266b62b36139533c6c8438c?acb8c9cfe266b62b36139533c6c8438c"/>
<meta name="msapplication-square70x70logo" content="static/mstile-70x70.png?c000672d960936509ee027c7fb248d32?c000672d960936509ee027c7fb248d32"/>
<meta name="msapplication-square150x150logo" content="static/mstile-150x150.png?c7977ba2a677d2fca50c96abd072654a?c7977ba2a677d2fca50c96abd072654a"/>
<meta name="msapplication-wide310x150logo" content="static/mstile-310x150.png?c8016c9e43e484d7fc603b533a011ce3?c8016c9e43e484d7fc603b533a011ce3"/>
<meta name="msapplication-square310x310logo" content="static/mstile-310x310.png?58e6cf2c144245512fe11ed58150aeb3?58e6cf2c144245512fe11ed58150aeb3"/>
</head>
<body class="global" rg-shortcuts-app shortcuts-loop>
<div class="app" ng-if="$root.isBootstrapped">
<div class="app__container">
<yt-header class="app__header"></yt-header>
<div ng-if="$root.applicationError" style="min-height: 360px;">
<yt-error code="{{$root.applicationError.status}}" guest="$root.applicationError.guest"></yt-error>
</div>
<div ng-if="!$root.applicationError" class="app__view-container">
<div class="app__view" ng-view></div>
</div>
</div>
</div>
<div rg-dialog=""></div>
<yt-splash-screen ng-if="!$root.isBootstrapped"></yt-splash-screen>
<yt-page-loader></yt-page-loader>
<div data-nosnippet id="ring-old-browsers-message" class="ring-old-browsers-message ring-old-browsers-message_hidden" hidden>
<span id="ring-old-browsers-message__smile" class="ring-old-browsers-message__smile" ng-non-bindable>{{ (>_<) }}</span>
<br/><br/>
<span id="ring-old-browsers-message__browser-message">This version of your browser is not supported.<br/>
Try upgrading to the latest stable version.</span>
<span id="ring-old-browsers-message__error-message">Something went seriously wrong.</span>
<br/><br/>
<!--[if IE 9]>
<span>When using IE9.0 or higher, make sure that compatibility mode is disabled.</span>
<![endif]-->
</div>
<script src="static/vendor.14b64b5b9fa8c1a94854.js"></script>
<script src="static/app.f37a204dea088328a5b0.js"></script>
</body>
</html> There isn't any useful metadata in the head that I can see, nor any fallback text in the body.
What makes you say this? I would guess that YouTrack serves up different HTML if the user agent says you're Slack.
|
Well it obviously makes the decision about the data it sends back based on the info we send it. To be clear I'm not necessarily saying that we should eg impersonate Slack. The resolution to this issue could very well be being better at detecting this kind of errors and just refusing to generate a preview in such cases (which Discord seems to do). |
I investigated this a bit more (out of curiosity) and as @DMRobertson pointed out the page that gets returned is rather useless if you don't have JavaScript enabled. (It pretty much is a page saying "enable JavaScript" and then rebuilds the entire page via AJAX.) Other things that I considered while investigating:
Yes, but it is possible that Slack has custom code to hit an API endpoint or do something different here, or maybe they're rendering with JavaScript enabled somehow? |
Seen just now in #synapse-dev:
The link is https://youtrack.jetbrains.com/issue/PY-54833/Pycharm-deletes-existing-poetry-environment
While Synapse itself is not failing to generate the preview, it seems to not be sending the correct data to the remote end.
I've tried it in a few other messengers. Discord seems to also fail to generate a preview but in this case just doesn't show anything client-side:
Slack on the other hand seems to be succeeding:
The text was updated successfully, but these errors were encountered: