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

wait-for-build throws error on PR page #2399

Closed
janpio opened this issue Sep 3, 2019 · 6 comments
Closed

wait-for-build throws error on PR page #2399

janpio opened this issue Sep 3, 2019 · 6 comments

Comments

@janpio
Copy link
Contributor

janpio commented Sep 3, 2019

(Firefox 68.0.2 (64-bit) on Windows 10, plugin version 19.9.2)

Happens for me on for example this PR: fastlane/fastlane#15255

image

19:36:52.676 ❌ wait-for-build content.js:2837:15
19:36:52.702
TypeError: "select_dom_default.a.last(...) is undefined"
    getLastCommit moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:5401
    addEventListener moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:5436
    wait_for_build_init moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:5519
    features_run moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:2833
    add moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:2880
    onAjaxedPages moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:2795
    onAjaxedPagesRaw moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:2790
content.js:2838:15
    features_run moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:2838
    add moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:2880
    onAjaxedPages moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:2795
    onAjaxedPagesRaw moz-extension://57b5be31-7fbe-4b7d-bae1-b2f5de44e6b4/content.js:2790

I don't know if this actually breaks anything, but I guess it should be fixed anyway.


Same on Chrome:
image

@janpio janpio added the bug label Sep 3, 2019
@jerone
Copy link
Contributor

jerone commented Sep 3, 2019

I cannot confirm this. Is there any other extension interfering?

@janpio
Copy link
Contributor Author

janpio commented Sep 3, 2019

No, I tested with only Refined Github enabled.

I can only reproduce on repos where I am admin or can merge PRs (feature probably only runs there).

Any way I can help debugging this?

@janpio
Copy link
Contributor Author

janpio commented Sep 3, 2019

This seems to be the code failing here:
https://github.com/sindresorhus/refined-github/blob/be74449658e54b01397eca2766d8aab3ac0a54ce/source/libs/pr-ci-status.ts#L7-L9

This is the full HTML code of the page as it is shown to me:
https://pastebin.com/Ry8HbgF2

This is the only occurence of commit-id:

  <div class="text-right">
    <code>
      <a href="/fastlane/fastlane/pull/15255/commits/e27e62e21686e4a9ae2962a8d0589c9f41aaf26b" class="commit-id">e27e62e</a>
    </code>
  </div>

commits-pushed does not appear at all, but if I understand the code snippet correctly that is exactly what should not appear for a match, correct?

@jerone
Copy link
Contributor

jerone commented Sep 4, 2019

I can only reproduce on repos where I am admin or can merge PRs (feature probably only runs there).

I still can't confirm this error. For example jerone/PackageSize#2, this is an PR and I'm admin of this repo. Checkbox is visible and no errors in console.

commits-pushed does not appear at all, but if I understand the code snippet correctly that is exactly what should not appear for a match, correct?

I'm not familiar with this feature, so I'll let @fregante answer your questions.

What do you get in the console when you execute the following snippet $$('[id^="commits-pushed"] .commit-id');?

@janpio
Copy link
Contributor Author

janpio commented Sep 4, 2019

New unclosed PR where I get this error:
fastlane/fastlane#15269

What do you get in the console when you execute the following snippet $$('[id^="commits-pushed"] .commit-id');?

22:54:17.015 $$('[id^="commits-pushed"] .commit-id');
22:54:17.026 Array []

image

@jerone
Copy link
Contributor

jerone commented Sep 4, 2019

Ah yes, I can confirm. It needs to be an unclosed PR.

That selector probably needs to be changed to select.last('.js-commit-group-commits .commit-id').

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants