Title: cy.intercept() TypeError: mime.getType is not a function · Issue #290 · browserstack/browserstack-cypress-cli · GitHub
Open Graph Title: cy.intercept() TypeError: mime.getType is not a function · Issue #290 · browserstack/browserstack-cypress-cli
X Title: cy.intercept() TypeError: mime.getType is not a function · Issue #290 · browserstack/browserstack-cypress-cli
Description: Hi team, we upgraded from Cypress 8.7.0 to Cypress v9.4.1 as this is the latest supported in Browserstack according to the docs https://www.browserstack.com/docs/automate/cypress/limitations One of our tests uses cy.intercept and after t...
Open Graph Description: Hi team, we upgraded from Cypress 8.7.0 to Cypress v9.4.1 as this is the latest supported in Browserstack according to the docs https://www.browserstack.com/docs/automate/cypress/limitations One of...
X Description: Hi team, we upgraded from Cypress 8.7.0 to Cypress v9.4.1 as this is the latest supported in Browserstack according to the docs https://www.browserstack.com/docs/automate/cypress/limitations One of...
Opengraph URL: https://github.com/browserstack/browserstack-cypress-cli/issues/290
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"cy.intercept() TypeError: mime.getType is not a function","articleBody":"Hi team, we upgraded from Cypress 8.7.0 to Cypress v9.4.1 as this is the latest supported in Browserstack according to the docs https://www.browserstack.com/docs/automate/cypress/limitations\r\n\r\nOne of our tests uses [`cy.intercept`](https://docs.cypress.io/api/commands/intercept#Syntax) and after the upgrade we noticed the following error in that test:\r\n\r\n```\r\nTypeError: An error was thrown while processing a network event: mime.getType is not a function\r\n TypeError: mime.getType is not a function\r\n at ret (/root/app/packages/server/lib/controllers/xhrs.js:120:19)\r\n at parseContentType (/root/app/packages/server/lib/controllers/xhrs.js:124:14)\r\n at /root/app/packages/net-stubbing/lib/server/util.js:106:107\r\n at Generator.next (\u003canonymous>:null:null)\r\n at fulfilled (/root/app/packages/net-stubbing/lib/server/util.js:5:58)\r\n```\r\n\r\nAfter debugging, I found out that the problem might be the version of the `mime` package, as it is used to parse the response mime type. Version `2.4.4` introduced breaking changes (like renaming `lookup` in favor of `getType`), but what is weird is that this version upgrade (from 1.6 to 2.4.4) was made in [Cypress v4.3.0](https://docs.cypress.io/guides/references/changelog#4-3-0) so...not sure what's going on.\r\n\r\nAny help will be much appreciated. Thank you in advance.\r\n\r\n","author":{"url":"https://github.com/vmcruz","@type":"Person","name":"vmcruz"},"datePublished":"2022-03-31T03:04:36Z","url":"https://github.com/browserstack/browserstack-cypress-cli/issues/290"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:191e86d6-566e-5a7e-0619-780dc2e2e3a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8042:29C09E:D717FA:12E33B8:6B04401A |
| html-safe-nonce | f4172fe67631cdbca5576cdf383dc857011a774f70afbcec3e38a02f5c798cc0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDQyOjI5QzA5RTpENzE3RkE6MTJFMzNCODo2QjA0NDAxQSIsInZpc2l0b3JfaWQiOiI3Nzg1MDU0ODMyMDEyMDUwNDU4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9c9350080eaca2903ed14318ff5378e34ac249a6d30a4ff1e9b84a9663b816a6 |
| hovercard-subject-tag | issue:1187429563 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/browserstack/browserstack-cypress-cli/290/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ed2899c31acebe3cac8c731e208b2bef4dda662ab10165667480164786429587/browserstack/browserstack-cypress-cli/issues/290 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ed2899c31acebe3cac8c731e208b2bef4dda662ab10165667480164786429587/browserstack/browserstack-cypress-cli/issues/290 |
| og:image:alt | Hi team, we upgraded from Cypress 8.7.0 to Cypress v9.4.1 as this is the latest supported in Browserstack according to the docs https://www.browserstack.com/docs/automate/cypress/limitations One of... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vmcruz |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9185ccfefd80c1ff2d9ddcdb0cd2becf46b5a1efbbf30741a895e4bb8de25e64 |
| turbo-cache-control | no-preview |
| go-import | github.com/browserstack/browserstack-cypress-cli git https://github.com/browserstack/browserstack-cypress-cli.git |
| octolytics-dimension-user_id | 1119453 |
| octolytics-dimension-user_login | browserstack |
| octolytics-dimension-repository_id | 242935045 |
| octolytics-dimension-repository_nwo | browserstack/browserstack-cypress-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 242935045 |
| octolytics-dimension-repository_network_root_nwo | browserstack/browserstack-cypress-cli |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 06dc448a76fe4751ac1db26524aefa3aa3e889a8 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width