Problem with attachShadow after update to v6

Hi guys,

I update my project from Ionic v5 to v6 (latest) but when i run my application, i’ve one error :

self.attachShadow is not a function

How can i solve this problem ?

My package.json :slight_smile:
{
“name”: “mobile-sale”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “https://ionicframework.com/”,
“scripts”: {
“ng”: “ng”,
“start”: “ng serve”,
“build”: “ng build”,
“test”: “ng test”,
“lint”: “ng lint”,
“e2e”: “ng e2e”
},
“private”: true,
“dependencies”: {
@angular/common”: “~12.1.1”,
@angular/core”: “~12.1.1”,
@angular/forms”: “~12.1.1”,
@angular/platform-browser”: “~12.1.1”,
@angular/platform-browser-dynamic”: “~12.1.1”,
@angular/router”: “~12.1.1”,
@auth0/angular-jwt”: “^5.0.2”,
@awesome-cordova-plugins/app-version”: “^5.39.0”,
@awesome-cordova-plugins/core”: “^5.37.2”,
@awesome-cordova-plugins/file”: “^5.37.3”,
@awesome-cordova-plugins/file-opener”: “^5.37.3”,
@awesome-cordova-plugins/file-transfer”: “^5.37.3”,
@awesome-cordova-plugins/keyboard”: “^5.38.0”,
@awesome-cordova-plugins/native-audio”: “^5.37.2”,
@awesome-cordova-plugins/network”: “^5.41.0”,
@awesome-cordova-plugins/nfc”: “^5.41.0”,
@awesome-cordova-plugins/spinner-dialog”: “^5.37.2”,
@awesome-cordova-plugins/vibration”: “^5.37.2”,
@capacitor/app”: “1.0.6”,
@capacitor/core”: “3.3.1”,
@capacitor/haptics”: “1.1.3”,
@capacitor/keyboard”: “1.1.3”,
@capacitor/status-bar”: “1.0.6”,
@ionic-native/app-preferences”: “^5.36.0”,
@ionic-native/core”: “^5.36.0”,
@ionic-native/device”: “^5.36.0”,
@ionic-native/http”: “^5.36.0”,
@ionic-native/network-interface”: “^5.36.0”,
@ionic/angular”: “^5.5.2”,
@ng-idle/core”: “^11.1.0”,
@ngx-translate/core”: “^14.0.0”,
@ngx-translate/http-loader”: “^7.0.0”,
“angularx-qrcode”: “^12.0.3”,
“cordova-android”: “9.1.0”,
“jwt-decode”: “^3.1.2”,
“messageformat”: “^2.3.0”,
“ngx-translate-messageformat-compiler”: “^4.11.0”,
“rxjs”: “~6.6.0”,
“swiper”: “^8.4.4”,
“tslib”: “^2.2.0”,
“uuid”: “^8.3.2”,
“zone.js”: “~0.11.4”
},
“devDependencies”: {
@angular-devkit/build-angular”: “~12.1.1”,
@angular-eslint/builder”: “~12.0.0”,
@angular-eslint/eslint-plugin”: “~12.0.0”,
@angular-eslint/eslint-plugin-template”: “~12.0.0”,
@angular-eslint/template-parser”: “~12.0.0”,
@angular/cli”: “~12.1.1”,
@angular/compiler”: “~12.1.1”,
@angular/compiler-cli”: “~12.1.1”,
@angular/language-service”: “~12.0.1”,
@angular/localize”: “^12.1.5”,
@capacitor/cli”: “3.3.1”,
@ionic/angular-toolkit”: “^4.0.0”,
@types/jasmine”: “~3.6.0”,
@types/jasminewd2”: “~2.0.3”,
@types/node”: “^12.11.1”,
@typescript-eslint/eslint-plugin”: “4.16.1”,
@typescript-eslint/parser”: “4.16.1”,
“com-darryncampbell-cordova-plugin-intent”: “^2.2.0”,
“cordova-plugin-advanced-http”: “^3.2.2”,
“cordova-plugin-androidx”: “^3.0.0”,
“cordova-plugin-androidx-adapter”: “^1.1.3”,
“cordova-plugin-app-preferences”: “github:myieye/me.apla.cordova.app-preferences”,
“cordova-plugin-app-version”: “^0.1.12”,
“cordova-plugin-device”: “^2.0.3”,
“cordova-plugin-file”: “^6.0.2”,
“cordova-plugin-file-opener2”: “^3.0.5”,
“cordova-plugin-file-transfer”: “^1.7.1”,
“cordova-plugin-globalization”: “^1.11.0”,
“cordova-plugin-ionic-keyboard”: “^2.2.0”,
“cordova-plugin-ionic-webview”: “^4.2.1”,
“cordova-plugin-native-spinner”: “^1.1.3”,
“cordova-plugin-nativeaudio”: “^3.0.9”,
“cordova-plugin-network-information”: “^3.0.0”,
“cordova-plugin-networkinterface”: “^2.2.0”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-statusbar”: “^2.4.2”,
“cordova-plugin-vibration”: “^3.1.1”,
“cordova-plugin-whitelist”: “^1.3.5”,
“eslint”: “^7.6.0”,
“eslint-plugin-import”: “2.22.1”,
“eslint-plugin-jsdoc”: “30.7.6”,
“eslint-plugin-prefer-arrow”: “1.2.2”,
“jasmine-core”: “~3.8.0”,
“jasmine-spec-reporter”: “~5.0.0”,
“karma”: “~6.3.2”,
“karma-chrome-launcher”: “~3.1.0”,
“karma-coverage”: “~2.0.3”,
“karma-coverage-istanbul-reporter”: “~3.0.2”,
“karma-jasmine”: “~4.0.0”,
“karma-jasmine-html-reporter”: “^1.5.0”,
“phonegap-nfc”: “^1.2.0”,
“protractor”: “~7.0.0”,
“ts-node”: “~8.3.0”,
“typescript”: “~4.2.4”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-statusbar”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {
“ANDROID_SUPPORT_ANNOTATIONS_VERSION”: “27.+”
},
“cordova-plugin-ionic-keyboard”: {},
“cordova-plugin-whitelist”: {},
“cordova-plugin-device”: {},
“com-darryncampbell-cordova-plugin-intent”: {},
“cordova-plugin-androidx”: {},
“cordova-plugin-androidx-adapter”: {},
“cordova-plugin-globalization”: {},
“cordova-plugin-networkinterface”: {},
“cordova-plugin-app-preferences”: {},
“cordova-plugin-advanced-http”: {
“ANDROIDBLACKLISTSECURESOCKETPROTOCOLS”: “SSLv3,TLSv1”
},
“cordova-plugin-nativeaudio”: {},
“cordova-plugin-vibration”: {},
“cordova-plugin-native-spinner”: {},
“cordova-plugin-file-transfer”: {},
“cordova-plugin-file-opener2”: {
“ANDROID_SUPPORT_V4_VERSION”: “27.+”
},
“cordova-plugin-file”: {},
“cordova-plugin-app-version”: {},
“phonegap-nfc”: {},
“cordova-plugin-network-information”: {}
},
“platforms”: [
“android”
]
}
}

Thanks for the answers !