cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.42k stars 3.14k forks source link

Site is not displayed properly with latest Cypress versions #9351

Closed dupli-kate closed 1 year ago

dupli-kate commented 3 years ago

This page has been displayed correctly with the older versions of Cypress. We started seeing this issue before version 5.5.0, but the named version fixed the issue. With the changes in 5.6.0 and later the issue is back.

Test code to reproduce

describe('Poker', () => {
    it('visits the page', () => {
        cy.visit('https://www.unibet.com/poker/poker-browser-new')
        cy.get('.modal').should('be.visible')
    })
})

How the page should look like (and does with Cypress version 5.5.0): Poker page with 5 5 0

How it looks like with Cypress 5.6.0 and later: Poker page with 5 6 0

What could be the issue here?

jennifer-shehane commented 3 years ago

This is failing starting in 5.6.0 introduced in https://github.com/cypress-io/cypress/pull/9018

Issue present: https://github.com/cypress-io/cypress/pull/9018 Issue not present: https://github.com/cypress-io/cypress/commit/dae76a8ec0a149d5f4ca4fbe4d15bea1b5f7449d

Reproducible code

cypress.json

{
  "chromeWebSecurity": false
}

spec.js

it('visits the page', () => {
  cy.visit('https://www.unibet.com/poker/poker-browser-new')
  cy.get('.modal')
})

5.5.0

Screen Shot 2020-11-30 at 10 52 13 AM

5.6.0

Screen Shot 2020-11-30 at 10 53 20 AM Screen Shot 2020-11-30 at 10 54 48 AM
kuceb commented 3 years ago

need to test pre-5.5.0 behavior to see if the bug has always existed or if it's only a change from 5.5.0

Siddhant-K-code commented 3 years ago

this issue is fixed, I guess !?

dupli-kate commented 3 years ago

this issue is fixed, I guess !?

Nope, 6.0.1 still has the issue, tested on Mac with Chrome (87), Firefox (83) and Electron (87)

sainthkh commented 3 years ago

This is happening because Cypress doesn't load dynamically JS files from the line below:

<script>!function(e){function o(a){if(r[a])return r[a].exports;var t=r[a]={i:a,l:!1,exports:{}};return e[a].call(t.exports,t,t.exports,o),t.l=!0,t.exports}var a=window.webpackJsonpUFE;window.webpackJsonpUFE=function(r,n,l){for(var i,c,d,s=0,f=[];s<r.length;s++)c=r[s],t[c]&&f.push(t[c][0]),t[c]=0;for(i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);for(a&&a(r,n,l);f.length;)f.shift()();if(l)for(s=0;s<l.length;s++)d=o(o.s=l[s]);return d};var r={},t={manifest:0};o.e=function(e){function a(){i.onerror=i.onload=null,clearTimeout(c);var o=t[e];0!==o&&(o&&o[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var n=new Promise(function(o,a){r=t[e]=[o,a]});r[2]=n;var l=document.getElementsByTagName("head")[0],i=document.createElement("script");i.type="text/javascript",i.charset="utf-8",i.async=!0,i.timeout=12e4,o.nc&&i.setAttribute("nonce",o.nc),i.src=o.p+""+({"async-shim":"async-shim","crypto-js-bundle":"crypto-js-bundle","global-bundle":"global-bundle",bonusProgressionNotification:"bonusProgressionNotification","lodash-bundle":"lodash-bundle","moment-bundle":"moment-bundle","other-react-bundle":"other-react-bundle","react-bundle":"react-bundle","sportsbook-components-bundle":"sportsbook-components-bundle","url-polyfill":"url-polyfill","util-bundle":"util-bundle","AcceptCampaign.controller":"AcceptCampaign.controller",AccordionElement:"AccordionElement",AccountBox:"AccountBox",AccountClosureController:"AccountClosureController",AdventCalendarController:"AdventCalendarController",AutoLoginForLegacy:"AutoLoginForLegacy",BonusListController:"BonusListController",BoxAnchor:"BoxAnchor",CampaignBlockerController:"CampaignBlockerController",CaptchaFlowController:"CaptchaFlowController",CommunicationPreferencesController:"CommunicationPreferencesController",CommunityLoginController:"CommunityLoginController",DepositLimitController:"DepositLimitController",DialogManagerController:"DialogManagerController",DrawerBottom:"DrawerBottom",EVerificationElementController:"EVerificationElementController",FlagshipWrapper:"FlagshipWrapper",FrankelNextToGoWrapper:"FrankelNextToGoWrapper",GameGridController:"GameGridController",GameLauncherController:"GameLauncherController",GamePluginController:"GamePluginController",microgaming:"microgaming",netent:"netent","GenericPokerAppError.controller":"GenericPokerAppError.controller",HeaderBarElementsController:"HeaderBarElementsController",HeaderController:"HeaderController",HelpCentreSearchController:"HelpCentreSearchController",HelpCentreSearchResultsController:"HelpCentreSearchResultsController",HighlightedEventsWrapper:"HighlightedEventsWrapper",ImageBanner:"ImageBanner",LicenseBlockController:"LicenseBlockController",LicenseBlockMessageController:"LicenseBlockMessageController",LicenseConsentModalController:"LicenseConsentModalController",ListElementController:"ListElementController",LiveAndUpcomingWrapper:"LiveAndUpcomingWrapper",LiveChatController:"LiveChatController",LossLimitController:"LossLimitController",LowFundsNotificationController:"LowFundsNotificationController",MarketSelectorController:"MarketSelectorController",MissingFieldsVerificationController:"MissingFieldsVerificationController",MobileLeftNavigationController:"MobileLeftNavigationController",NextToGoWrapper:"NextToGoWrapper",ProductBlockController:"ProductBlockController",PromoCodeController:"PromoCodeController",QuickAccessNavWrapper:"QuickAccessNavWrapper",RealityCheckController:"RealityCheckController",RecommendationWidgetWrapper:"RecommendationWidgetWrapper",RegistrationFormElementController:"RegistrationFormElementController",RegistrationMethods:"RegistrationMethods",ResetPassword:"ResetPassword",RestrictedFundsController:"RestrictedFundsController",ReverseWithdrawalNotificationController:"ReverseWithdrawalNotificationController",SelfExclusion:"SelfExclusion",SeoElementController:"SeoElementController",SessionLimit:"SessionLimit",SourceOfWealthElementController:"SourceOfWealthElementController",Sportsbook:"Sportsbook",TeasableContentElementController:"TeasableContentElementController",TransactionHistoryWrapperElementController:"TransactionHistoryWrapperElementController",UnsubscribeElementController:"UnsubscribeElementController",UpdateBrowserNotificationController:"UpdateBrowserNotificationController",UserInfoController:"UserInfoController",VerificationCategoryController:"VerificationCategoryController",VerifiedCommunicationChannelController:"VerifiedCommunicationChannelController",Alert:"Alert",AustralianRacing:"AustralianRacing",BehaviouralNavigation:"BehaviouralNavigation",BingoMobileGameLauncher:"BingoMobileGameLauncher",BinksClient:"BinksClient",BonusTAC:"BonusTAC",Campaign:"Campaign",CampaignBlocker:"CampaignBlocker",CampaignImageBanner:"CampaignImageBanner",CarrierService:"CarrierService",ChangePasswordDialog:"ChangePasswordDialog",Clock:"Clock",ComplementaryOdds:"ComplementaryOdds",CookieNotification:"CookieNotification",CountrySelector:"CountrySelector",DefaultCampaign:"DefaultCampaign",DepositButton:"DepositButton",DepositLottery:"DepositLottery",Dispatcher:"Dispatcher",DynamicLoad:"DynamicLoad",DynamicStateTournament:"DynamicStateTournament",EditUserDetails:"EditUserDetails",ElasticList:"ElasticList",ErrorArticle:"ErrorArticle",ExternalAuthLogin:"ExternalAuthLogin",FAQViewAll:"FAQViewAll",FilteredGamesResult:"FilteredGamesResult",FinishedTournaments:"FinishedTournaments",Flash:"Flash",FormTest:"FormTest",GamblingProfile:"GamblingProfile",Game:"Game",GameAspect:"GameAspect",GameCTA:"GameCTA",GameNavigation:"GameNavigation",GameSearch:"GameSearch",GameTournamentSidebar:"GameTournamentSidebar",GameTournaments:"GameTournaments",GameWindow:"GameWindow",Glossary:"Glossary",GlossaryPod:"GlossaryPod",HallOfFame:"HallOfFame",HelpCentreNavigation:"HelpCentreNavigation",IntegratedFrame:"IntegratedFrame",Jackpots:"Jackpots",KambiClient:"KambiClient",KambiHtml5:"KambiHtml5",Leaderboard:"Leaderboard",LiveBettingTicker:"LiveBettingTicker",LoyaltyLevelsPod:"LoyaltyLevelsPod",LoyaltyMoneyRewardPod:"LoyaltyMoneyRewardPod",LoyaltyOverview:"LoyaltyOverview",LoyaltyUnclaimedInstantRewards:"LoyaltyUnclaimedInstantRewards",MediaCarousel:"MediaCarousel",Messages:"Messages",MultiPageRegistrationForm:"MultiPageRegistrationForm",MultipleLogin:"MultipleLogin",MyAccountNavigation:"MyAccountNavigation",Navigation:"Navigation",NemIDJSLogin:"NemIDJSLogin",Notification:"Notification",OptIn:"OptIn",PaymentHistory:"PaymentHistory",PaymentIframe:"PaymentIframe",PlayModeSelector:"PlayModeSelector",PlayersOnline:"PlayersOnline",PokerAlias:"PokerAlias",PokerBrowserClient:"PokerBrowserClient",PokerGettingStarted:"PokerGettingStarted",PokerLauncher:"PokerLauncher",PokerVipPoints:"PokerVipPoints",Poll:"Poll",ProductBlockMessage:"ProductBlockMessage",ProgressCircles:"ProgressCircles",PromotionOptIn:"PromotionOptIn",PromotionPlayer:"PromotionPlayer",RealityCheck:"RealityCheck",RecommendedGames:"RecommendedGames",RegistrationForm:"RegistrationForm",RequestCredentials:"RequestCredentials",RetentionBonusTAC:"RetentionBonusTAC",ReverseWithdrawal:"ReverseWithdrawal",SessionTimeout:"SessionTimeout",SiteIndex:"SiteIndex",SlidePanelMenu:"SlidePanelMenu",SpendingLimit:"SpendingLimit",StssClient:"StssClient",SubNavigation:"SubNavigation",SystemInfoElement:"SystemInfoElement",TabletEvents:"TabletEvents",TeaserSet:"TeaserSet",Tournament:"Tournament",TournamentDetails:"TournamentDetails",TournamentFinished:"TournamentFinished",TournamentList:"TournamentList",TransactionHistory:"TransactionHistory",UpcomingTournaments:"UpcomingTournaments",UpdateBrowserNotification:"UpdateBrowserNotification",UploadDocuments:"UploadDocuments",UserBalance:"UserBalance",Video:"Video",ViewUserDetails:"ViewUserDetails",Winners:"Winners","async-util-bundle":"async-util-bundle","svg-icons":"svg-icons"}[e]||e)+"-"+{"async-shim":"87aa203f9902f6fc5307d","crypto-js-bundle":"cf24b71bedf0b7521b35c","global-bundle":"72e031fb1d9f221afedec",bonusProgressionNotification:"ead598edc1283cb871916","lodash-bundle":"553415c00d5516dc02eac","moment-bundle":"1f995b9b6ebae5e6db194","other-react-bundle":"609d57e2174c98ee505af","react-bundle":"32a65c0d8d4bedd022dc8","sportsbook-components-bundle":"98293bd7d562b220a4316","url-polyfill":"cf45a643d1221c88da963","util-bundle":"ebaf9263683ceb9ebe248","AcceptCampaign.controller":"89b77379a94c83b95a4bf",AccordionElement:"e636cabef2827782d5d62",AccountBox:"ddc9c1bac821bcbf97e36",AccountClosureController:"1f8bce3e09654b428ef96",AdventCalendarController:"9c65c74714274b4d65ae5",AutoLoginForLegacy:"f03ad13c2fbe16646cb23",BonusListController:"c9508b1ab5e876f784f29",BoxAnchor:"1c88759073a22d3c22f02",CampaignBlockerController:"813f34115d94c00c67c83",CaptchaFlowController:"ecbbb44250df9d2662dc4",CommunicationPreferencesController:"c50393dd7861fbe1a3489",CommunityLoginController:"d65792ced81e81a780be7",DepositLimitController:"b5189a409c9f5082f4489",DialogManagerController:"447e35ec67df35fc6739e",DrawerBottom:"0bd7a3f34fafe04dff129",EVerificationElementController:"720398ca81b25ac0ef992",FlagshipWrapper:"f9649f4ad0453a85c4a31",FrankelNextToGoWrapper:"2b97e1f5688fffef2d964",GameGridController:"5e7eb16fadaab8c4a35fa",GameLauncherController:"314aaf35d0251f141d0e5",GamePluginController:"bb20073aa469dfb6f36ef",microgaming:"b3e81ac4c2e1b019a9e64",netent:"aaea7a59bc5e8e0583a60","GenericPokerAppError.controller":"39dcc671d316167232f50",HeaderBarElementsController:"da3934dbcd02113ae120f",HeaderController:"7a49cf2cbd42a18e158f0",HelpCentreSearchController:"a7ab39ef7f2ae2d46ebfd",HelpCentreSearchResultsController:"f86567ba421266ae8ca1b",HighlightedEventsWrapper:"38d64fad6d3e07da40f35",ImageBanner:"4f3ffe6db410a68f335ad",LicenseBlockController:"6b850e6d848543f837555",LicenseBlockMessageController:"91cf1c28178f24ca73915",LicenseConsentModalController:"23d37c8bb9ae05fa281fd",ListElementController:"45d91d0b7eaf5509273b4",LiveAndUpcomingWrapper:"cd87bee5f400e37773cf1",LiveChatController:"80a2eba599b3000e83776",LossLimitController:"beb28b4e326d1f30f92a9",LowFundsNotificationController:"144a7e2a3a64b7815d4d0",MarketSelectorController:"d2aa20f45a1560f6f26df",MissingFieldsVerificationController:"f20da6369be123e602483",MobileLeftNavigationController:"8e2639285c9e54764f4c0",NextToGoWrapper:"7b79a0ec5c74239f863f0",ProductBlockController:"151361610b1bfa3907ecd",PromoCodeController:"bf719c682347a2a864646",QuickAccessNavWrapper:"403deea8f9f0f87f77314",RealityCheckController:"1cab272a6b36bd73c36fd",RecommendationWidgetWrapper:"c055f77b7e929ebb22af8",RegistrationFormElementController:"ef3562be6146114772218",RegistrationMethods:"ab835c8aedf3d7e979c23",ResetPassword:"a3f6ea5a042efae9133ae",RestrictedFundsController:"9dab09346506f67ba9c24",ReverseWithdrawalNotificationController:"0af2b2d15cec085d55c17",SelfExclusion:"b9b03a88f0dce0b4b6a54",SeoElementController:"fa17ab7c96cae72c65fcb",SessionLimit:"da2abdc51a31d9bf74e49",SourceOfWealthElementController:"a77162818433145828640",Sportsbook:"bf0dc0036b838be4b0ee2",TeasableContentElementController:"e1c2edcdab2accfd2a4f6",TransactionHistoryWrapperElementController:"d724d1086bdb5b115644f",UnsubscribeElementController:"ed2cb16052588712630d9",UpdateBrowserNotificationController:"21af7dcc8402007c78b61",UserInfoController:"85cb14296808cfd0a11c5",VerificationCategoryController:"ca908255d7d183a990e91",VerifiedCommunicationChannelController:"11be858df517b68033d1e",Alert:"212dde2bbe6342739eb0a",AustralianRacing:"0823d45e8787997664df3",BehaviouralNavigation:"73cc1bfbb3a6d6b073ab1",BingoMobileGameLauncher:"c76377be496b5cbf09743",BinksClient:"61da062c1ebcb66d89545",BonusTAC:"f51f8046331c3471fd828",Campaign:"267cbb90bc45342ee8368",CampaignBlocker:"acf5a84f62b69835eed5e",CampaignImageBanner:"139a7553fa1f334df899c",CarrierService:"61833ba15b864e6e9d74a",ChangePasswordDialog:"34d0cd79e335fe1750d7d",Clock:"e732fcbbd704839b61d8a",ComplementaryOdds:"620ef2c14a351de4eae84",CookieNotification:"2a971967c9e44401d3724",CountrySelector:"98de6c746105e02441b0d",DefaultCampaign:"20fa58cb13b4ffe462ef6",DepositButton:"be4b0e6e7c2bfe90ca102",DepositLottery:"dc7bd9e4506b8bbd22142",Dispatcher:"c1573271ae358d7f7ec62",DynamicLoad:"ded09b53ed08a251bd373",DynamicStateTournament:"3aeb6249c4ffb70719b8a",EditUserDetails:"6f75d1d3947aac4943cb6",ElasticList:"6fd7903315a92c1d18289",ErrorArticle:"47295aab2a24efdfad4b2",ExternalAuthLogin:"6c2bcb3172003e9bb3cdc",FAQViewAll:"f805d8607cfcbe2395b88",FilteredGamesResult:"5b74a938b064de689f039",FinishedTournaments:"0ae392b43560f4312a45d",Flash:"39c93d08fbb3632330a85",FormTest:"9a6cfeae199e69ff39503",GamblingProfile:"5ca1c279e9aff1cde4ea2",Game:"6d63680a4e97a56c784f1",GameAspect:"88c915143c946dcfb5078",GameCTA:"8300ec341ef3c9219c184",GameNavigation:"8c0a4477887982c0272b6",GameSearch:"b9a6a1f95b34e0e80bfc2",GameTournamentSidebar:"b9a8bbc0e40cfc9029d12",GameTournaments:"717dbc4f944fb039e5be4",GameWindow:"2d304f0729ac051b491a9",Glossary:"048a9dc336ceeb9e03793",GlossaryPod:"00ed53cb4ed0ec798ccb8",HallOfFame:"2db49149575df1aa761de",HelpCentreNavigation:"d7f741641f5f081e938fa",IntegratedFrame:"8a06bdd8fc5038935f147",Jackpots:"85810697da477ae60b217",KambiClient:"7360302cfd0a4b992b129",KambiHtml5:"a86caf5d19f7957a49a05",Leaderboard:"48dbccc11d86ee473e0f1",LiveBettingTicker:"eb270dc285f18808ae101",LoyaltyLevelsPod:"b69ecb085948b568ac024",LoyaltyMoneyRewardPod:"5e1523bcb033c74c017df",LoyaltyOverview:"7ad352b7f1e51c8d82fd8",LoyaltyUnclaimedInstantRewards:"78108c2a777f06b567221",MediaCarousel:"9d5bf4258cb8f01119ebd",Messages:"2f6bf0320c0e74a79b7e8",MultiPageRegistrationForm:"09e044abca356eaf6fbde",MultipleLogin:"85bd64fa642ba3fe90c57",MyAccountNavigation:"ce3ea7bd2feebad8245e2",Navigation:"fd7a4acfb81cd651b9e9c",NemIDJSLogin:"d2c5e5e7d001af1f06dbe",Notification:"e30bc8bc60bfca39f9c68",OptIn:"fe7a401922fec8ef82edf",PaymentHistory:"6c2100e3f37751370aefc",PaymentIframe:"28fe7a850f620b1669c9e",PlayModeSelector:"754af3b1ae0d8070a1acb",PlayersOnline:"22af8aa8694d5219df891",PokerAlias:"80f20c36e5696923008b5",PokerBrowserClient:"fbbf4a58f012e3238feb1",PokerGettingStarted:"2a598f15dd192f1a3bad5",PokerLauncher:"fb1b13be395723fb9f701",PokerVipPoints:"54141b113d70f6335eaeb",Poll:"d705395371b34f954cb0a",ProductBlockMessage:"75723edaf6aa87b0206b9",ProgressCircles:"3ec84551c855d4fa83cc2",PromotionOptIn:"109cacf64fddb804273e9",PromotionPlayer:"1f3b8da9ef138532c0e31",RealityCheck:"2a0a616dac3507200a2c2",RecommendedGames:"524272fa3b6ff9587dcdd",RegistrationForm:"bdd081ca05f86a0397cc8",RequestCredentials:"aa5ff724039e31a513e83",RetentionBonusTAC:"38dd7f3bb94f0f5bb3ba8",ReverseWithdrawal:"3472a44c5f74f226199e7",SessionTimeout:"ef3ef572fab46fbd695f2",SiteIndex:"dcad5b4c590daec793f6f",SlidePanelMenu:"49f697729ac22d2f42e69",SpendingLimit:"f2baf844a75565d33c975",StssClient:"bb6eebe9836e1ebafcaec",SubNavigation:"9466e5867bb95b20b162d",SystemInfoElement:"9a28f4821a26870fec8fd",TabletEvents:"80c01eb689edf8e35cf3b",TeaserSet:"61f20fc57ecd05514fa24",Tournament:"532cb6d4873e048ec6254",TournamentDetails:"6a4974867cf6a73a68b45",TournamentFinished:"011dc3d2602dbef04e6b9",TournamentList:"15b165b1070cf026e7c2a",TransactionHistory:"4a2b6cc92146df1aa65d0",UpcomingTournaments:"d35d149b3a110e3b67f12",UpdateBrowserNotification:"0778f00d3494610280c72",UploadDocuments:"40e8bc630f5c4ef22c6c0",UserBalance:"80fed71be2e9eec0aadb6",Video:"81785ad4b860a26735b0e",ViewUserDetails:"3b52c33fff3eee7517e64",Winners:"5a25a480b4d003befd05e","async-util-bundle":"b6fc54d97755e57b12348","svg-icons":"de701e6d4c713628e4161"}[e]+".js";var c=setTimeout(a,12e4);return i.onerror=i.onload=a,l.appendChild(i),n},o.m=e,o.c=r,o.d=function(e,a,r){o.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(a,"a",a),a},o.o=function(e,o){return Object.prototype.hasOwnProperty.call(e,o)},o.p="",o.oe=function(e){throw console.error(e),e}}([]);

Because of this, util-bundle-ebaf92.js isn't loaded and we get setFirstFocus() error.

jennifer-shehane commented 2 years ago

This is still an issue in Cypress 8.2.0

cypress-app-bot commented 1 year ago

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

cypress-app-bot commented 1 year ago

This issue has been closed due to inactivity.