m-radzikowski / youtrack-issue-cards-printer

Google Chrome extension to print issues from JetBrains YouTrack as cards for physical scrum board
https://chrome.google.com/webstore/detail/youtrack-issue-cards-prin/pjcejghclgihlhinleocjojdalhnhckp
Apache License 2.0
5 stars 1 forks source link

Click extension or print button after installing does nothing #5

Closed TristanBossa closed 6 years ago

TristanBossa commented 6 years ago

As mentioned in the title after installing the extension printing broke.

The console shows this error:

Uncaught TypeError: Cannot read property 'replaceAll' of undefined at Webr.component.ComponentRegistry._normalize (bundledJavaScript-1277617f402c6d62276d3c1c1e111a1a.js:32) at Webr.component.ComponentRegistry.getComponentSource (bundledJavaScript-1277617f402c6d62276d3c1c1e111a1a.js:28) at Webr.component.ComponentRegistry.createServerEventConfig (bundledJavaScript-1277617f402c6d62276d3c1c1e111a1a.js:27) at HTMLButtonElement.Webr.component.ComponentRegistry.serverHandler (bundledJavaScript-1277617f402c6d62276d3c1c1e111a1a.js:30) at HTMLButtonElement.dispatch (bundledJavaScript-1277617f402c6d62276d3c1c1e111a1a.js:144) at HTMLButtonElement.v.handle (bundledJavaScript-1277617f402c6d62276d3c1c1e111a1a.js:144)

m-radzikowski commented 6 years ago

Hey, could you please provide your YouTrack version and Chrome version?

TristanBossa commented 6 years ago

Youtrack version is: 2017.4 Chrome is: Version 63.0.3239.132 (Official Build) (64-bit)

m-radzikowski commented 6 years ago

The error you pasted is not from the extension, but from YouTrack itself. bundledJavaScript-HASH.js is YT script. And extension does not call any of YT methods, so the error is weird and probably unrelated to extension?

I've tested the extension on the same version of Chrome and the same version of YT, and it works well on my few machines. To find further info please:

TristanBossa commented 6 years ago

Sorry for the delay here is the info you asked for:

When showing the background page console i get this error:

VM48:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse (<anonymous>) at XMLHttpRequest.xhr.onreadystatechange (page-action.js:44) xhr.onreadystatechange @ page-action.js:44 XMLHttpRequest.send (async) fetchIssues @ page-action.js:62 (anonymous) @ page-action.js:84 safeCallbackApply @ extensions::uncaught_exception_handler:27 handleResponse @ extensions::sendRequest:67

The print button definitely works without the extension installed and stops working when its installed

m-radzikowski commented 6 years ago

Ok, it looks like a problem with YouTrack REST API call. Please:

  1. Go to JetBrains YouTrack: https://youtrack.jetbrains.com/issues, click print button (or extension icon), does the print page (from the extension) open? You don't have to be logged in.

  2. Check your YouTrack instance REST API - go here: https://client.restlet.com/#share=https://client.restlet.com/api/share/5a5d0d44a0b6db0ab077684d, change address from youtrack.jetbrains.com to your instance URL, and send a request. You should get JSON (not XML!) in response, with Content-Type header "application/json:charset=utf8". Could you verify it for me?

TristanBossa commented 6 years ago

Okay using the extension on the youtrack issue url works fine for me.

When checking our REST API I get the result in the attached image youtrackrestresult

m-radzikowski commented 6 years ago

Hi, I've just published fixed version 0.1.1. It should generate issues from your YouTrack instance properly now. If any problem occures, let me know.

Thanks for the help with debugging.

TristanBossa commented 6 years ago

Excellent it now works thanks!