ToranSharma / Duo-Strength

Browser extension to add back the strength for each individual skill, and other useful hidden statistics.
MIT License
35 stars 6 forks source link

newWordPopover is null #209

Closed empathicqubit closed 2 years ago

empathicqubit commented 2 years ago

When trying to do lesson https://www.duolingo.com/skill/de/Verbs-7/1 , the second question is always blank, but the audio plays.

{
    "Debug Info from Tab 52": {
        "username": "empathicqubit",
        "userId": "517253432",
        "UICode": "en",
        "languageCode": "de",
        "language": "German",
        "mastered": [],
        "requestId": 1,
        "requestsPending": 0,
        "onMainPage": false,
        "onLoginPage": false,
        "inMobileLayout": false,
        "progress": [
            [
                1647730800000,
                0,
                388
            ]
        ],
        "Total Storage Usage": "There are 2214B/102400B (2.2%) being used in total",
        "progress Storage Usage": "There are 52B/8192B (0.6%) being used in a single entry",
        "mastered Storage Usage": "There are 0B/8192B (0.0%) being used in a single entry",
        "options Storage Usage": "There are 2130B/8192B (26.0%) being used in a single entry",
        "treeLevels Storage Usage": "There are 32B/8192B (0.4%) being used in a single entry",
        "chrome.storage.sync": {
            "treeLevels": {
                "517253432:en->de": 0
            },
            "progress": {
                "517253432:en->de": [
                    [
                        1647730800000,
                        0,
                        388
                    ]
                ]
            },
            "options": {
                "darkOptions": true,
                "strengthBars": true,
                "strengthBarBackgrounds": true,
                "ignoreMasteredSkills": true,
                "masteredButton": true,
                "masteredCriterion": "markedOnly",
                "masteredThreshold": "5",
                "separateGrammarSkillMasteredThreshold": false,
                "grammarMasteredThreshold": "2",
                "needsStrengtheningList": true,
                "needsStrengtheningListLength": "10",
                "showBonusSkillsInNeedsStrengtheningList": true,
                "needsStrengtheningPopoutButton": true,
                "practiseL5NeedsStrengtheningSkills": false,
                "needsStrengtheningListSortOrder": "0",
                "crackedSkillsList": true,
                "crackedSkillsListLength": "10",
                "showBonusSkillsInCrackedSkillsList": true,
                "crackedPopoutButton": true,
                "crackedSkillsListSortOrder": "0",
                "practiseL5CrackedSkills": false,
                "skillSuggestion": true,
                "skillSuggestionMethod": "0",
                "hideSuggestionNonStrengthened": true,
                "hideSuggestionWithCrackedSkills": true,
                "suggestionPopoutButton": true,
                "focusFirstSkill": true,
                "focusPriorities": "ncs",
                "practiceType": "0",
                "lessonThreshold": "4",
                "showOnlyNeededSkills": false,
                "showCompletedCheckpointsWithSkillsThatNeedAttention": false,
                "fixedSidebar": false,
                "focusMode": false,
                "focusModeButton": true,
                "showLeagues": true,
                "treeLevelBorder": true,
                "crownsInfo": true,
                "crownsInfoInSidebar": false,
                "crownsInfoInPopup": true,
                "crownsMaximum": true,
                "crownsPercentage": true,
                "crownsGraph": true,
                "goldenTreePercentage": false,
                "crownsBreakdown": true,
                "crownsBreakdownShowZerosRows": true,
                "bonusSkillsBreakdown": true,
                "separateGrammarSkillsInBreakdown": true,
                "grammarSkillsBreakdown": true,
                "checkpointPrediction": true,
                "treeLevelPrediction": true,
                "XPInfo": true,
                "XPInfoInSidebar": true,
                "XPInfoInPopup": false,
                "XPBreakdown": true,
                "XPPrediction": true,
                "languagesInfo": true,
                "languagesInfoSortOrder": "0",
                "totalStrengthBox": true,
                "sidebarBoxOrder": " ",
                "showTranslationText": true,
                "showToggleHidingTextButton": true,
                "showNewWords": true,
                "revealHotkey": true,
                "revealHotkeyCode": "Ctrl+Alt+H",
                "revealNewWordTranslation": true,
                "hideCartoons": false,
                "keepQuestionBorders": false,
                "addTipsPagePractiseButton": true,
                "legendaryTipsPageButton": true,
                "addTipsPageBottomButtons": true,
                "practiseButton": true,
                "crownZeroPractiseButton": false,
                "wordsButton": true,
                "grammarSkillsTestButton": true,
                "checkpointButtons": true
            }
        }
    }
}

Firefox 98

I tried disabling uMatrix to make sure a blocked script wasn't causing the issue, but I did not disable uBlock Origin. Disabling Duo Strength fixed the issue.

Uncaught (in promise) TypeError: newWordPopover is null
    play https://www.duolingo.com/skill/de/Verbs-7/1:51
    x https://d35aaqx5ub95lt.cloudfront.net/js/app-0c3b4231.js:1
    ce https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    de https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    r https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    promise callback*l https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    oe https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    oe https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    de https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    r https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    handleNextButtonClick https://d35aaqx5ub95lt.cloudfront.net/js/session-e81f01b2.js:1
    ar https://d35aaqx5ub95lt.cloudfront.net/js/session-e81f01b2.js:1
    ar https://d35aaqx5ub95lt.cloudfront.net/js/session-e81f01b2.js:1
    handleNextButtonClick https://d35aaqx5ub95lt.cloudfront.net/js/session-e81f01b2.js:1
    handleKeydown https://d35aaqx5ub95lt.cloudfront.net/js/session-e81f01b2.js:1
    r https://d35aaqx5ub95lt.cloudfront.net/js/app-0c3b4231.js:1
    addEventListener eval:4
    addListener https://d35aaqx5ub95lt.cloudfront.net/js/app-0c3b4231.js:1
    componentDidMount https://d35aaqx5ub95lt.cloudfront.net/js/session-e81f01b2.js:1
    fu https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    As https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    unstable_runWithPriority https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    qo https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    Os https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    ps https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    Zo https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    unstable_runWithPriority https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    qo https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    Zo https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    Vo https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    ss https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    Aa https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    e https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    setTimeout handler*58382/b/f</e< https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    setTimeout handler*58382/b/f< https://d35aaqx5ub95lt.cloudfront.net/js/5729-9ba93d61.js:1
    Rs https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    unstable_runWithPriority https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    qo https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    Cs https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    Ts https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    L https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    onmessage https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    73323 https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    o https://d35aaqx5ub95lt.cloudfront.net/js/manifest-db9565c9.js:1
    91102 https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    o https://d35aaqx5ub95lt.cloudfront.net/js/manifest-db9565c9.js:1
    43577 https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    o https://d35aaqx5ub95lt.cloudfront.net/js/manifest-db9565c9.js:1
    31542 https://d35aaqx5ub95lt.cloudfront.net/js/1400-62105cbb.js:2
    o https://d35aaqx5ub95lt.cloudfront.net/js/manifest-db9565c9.js:1
    82271 https://d35aaqx5ub95lt.cloudfront.net/js/app-0c3b4231.js:1
    o https://d35aaqx5ub95lt.cloudfront.net/js/manifest-db9565c9.js:1
    <anonymous> https://d35aaqx5ub95lt.cloudfront.net/js/app-0c3b4231.js:1
    O https://d35aaqx5ub95lt.cloudfront.net/js/manifest-db9565c9.js:1
    <anonymous> https://d35aaqx5ub95lt.cloudfront.net/js/app-0c3b4231.js:1
    a https://d35aaqx5ub95lt.cloudfront.net/js/manifest-db9565c9.js:1
    <anonymous> https://d35aaqx5ub95lt.cloudfront.net/js/app-0c3b4231.js:1
empathicqubit commented 2 years ago

It seems to also break the mouseover audio for new words. Turning off auto translate new words seems to fix it.

ToranSharma commented 2 years ago

@empathicqubit Thanks for reporting this, I'll try to look at it as soon as I can.

ricedwlit commented 2 years ago

Wanted to chime in that I was encountering this problem as well (e.g. https://www.duolingo.com/skill/es/Speculate/3). The proposed workaround (turning off auto translate new words) has been working for me as well.

Mac OS 12.2.1, Chrome Version 99.0.4844.83 (Official Build) (x86_64)

ToranSharma commented 2 years ago

In the bit of testing I have done, I have not had any issues with the auto translate new words feature. Based on @empathicqubit's error message, I have added a null check before using newWordPopover. I don't really see a way that it would ever be null when it is used, but it can't hurt to add the check.

This change was made in 9099963 and will be released as part of v2.0.24 later today.

Let me know if once the update rolls out the issue is fixed or persists. Toran

ricedwlit commented 2 years ago

I've got the latest version and have not seen the issue again. In particular I encountered a situation where it have previously occurred (the tell was not hearing a sound when I clicked on the green check button to advance to the next question), however this time the next page loaded correctly.

Thanks for fixing this!

ToranSharma commented 2 years ago

That's good to hear, I'll close the issue now then, let me know if you have any other problems.

Toram