Skip to content

Attempt to invoke virtual method 'java.lang.String org.webrtc.MediaStream.getId()' on a null object reference  #32

@hrueger

Description

@hrueger

Make sure to check the demo app(s) for sample usage

I did.

Make sure to check the existing issues in this repository

I did.

If the demo apps cannot help and there is no issue for your problem, tell us about it

I ran into the same issue as #31 . So I searched on the internet and found out that it could be a problem with the multi dex config. My app.gradle looks like this:

dependencies {
  compile 'com.android.support:multidex:1.0.0'
}

android {  
  defaultConfig {  
    generatedDensities = []
    applicationId = "tld.domain.subdomain" 
    multiDexEnabled true  
  }  
  aaptOptions {  
    additionalParameters "--no-version-vectors"  
  }
  compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
  }
} 
def settingsGradlePath
if(project.hasProperty("appResourcesPath")){
    settingsGradlePath = "$project.appResourcesPath/Android/settings.gradle";
} else {
    settingsGradlePath = "$rootDir/../../app/App_Resources/Android/settings.gradle";
}
def settingsGradleFile = new File(settingsGradlePath);
if(settingsGradleFile.exists())
{
    apply from: settingsGradleFile;
}

I added android.enableDexingArtifactTransform.desugaring=false to the App_Ressources/Android/gradle.properties which solved #31 . But now, once I open the call component which includes the readme's sample code, I get this error message after I got asked for the camera and microphone permissions:
error

Which platform(s) does your issue occur on?

  • iOS/Android/Both: only Android
  • iOS/Android versions: I've tested with android 9, I don't know about the other versions.
  • emulator or device. What type of device: Real device

Please, provide the following version numbers that your issue occurs with:

  • CLI: 6.3.0
  • Cross-platform modules: 6.3.2
  • Runtime(s): 6.3.0
  • Plugin(s):
"dependencies": {
        "@angular/animations": "^8.2.14",
        "@angular/cdk": "^8.2.3",
        "@angular/common": "8.2.14",
        "@angular/compiler": "8.2.14",
        "@angular/core": "8.2.14",
        "@angular/fire": "5.2.3",
        "@angular/forms": "8.2.14",
        "@angular/http": "7.2.15",
        "@angular/platform-browser": "8.2.14",
        "@angular/platform-browser-dynamic": "8.2.14",
        "@angular/router": "8.2.14",
        "@ctrl/ngx-emoji-mart": "1.0.5",
        "@fortawesome/fontawesome-free": "5.12.0",
        "@nativescript/theme": "2.2.1",
        "@ng-bootstrap/ng-bootstrap": "5.1.4",
        "@ngx-translate/core": "^11.0.1",
        "@ngx-translate/http-loader": "^4.0.0",
        "@nstudio/nativescript-pulltorefresh": "1.1.1",
        "@nstudio/nativescript-snackbar": "^1.1.1",
        "@syncfusion/ej2-angular-inputs": "^17.4.39",
        "@syncfusion/ej2-angular-layouts": "^17.4.40",
        "@syncfusion/ej2-angular-navigations": "^17.4.39",
        "@syncfusion/ej2-angular-popups": "^17.4.39",
        "@syncfusion/ej2-angular-schedule": "^17.4.39",
        "@syncfusion/ej2-layouts": "^17.4.40",
        "ajv": "^6.10.2",
        "angularx-flatpickr": "^6.2.0",
        "bootstrap": "^4.4.1",
        "chart.js": "^2.9.3",
        "chartjs-plugin-datalabels": "^0.7.0",
        "cldr-data": "^36.0.0",
        "core-js": "^3.6.1",
        "date-fns": "^2.8.1",
        "firebase": "^7.6.1",
        "fontawesome": "^5.6.3",
        "nativescript-accordion": "^6.0.0-beta.2",
        "nativescript-angular": "8.20.3",
        "nativescript-animated-circle": "^1.2.0",
        "nativescript-appversion": "^1.4.4",
        "nativescript-background-http": "^4.2.1",
        "nativescript-cache": "^1.0.0",
        "nativescript-camera": "^4.5.0",
        "nativescript-carousel": "^6.1.1",
        "nativescript-cfalert-dialog": "^1.0.15",
        "nativescript-clipboard": "^1.2.0",
        "nativescript-contacts-lite": "^0.2.6",
        "nativescript-downloader": "2.1.5",
        "nativescript-emoji-picker": "0.2.4",
        "nativescript-exit": "^1.0.1",
        "nativescript-feedback": "^1.3.12",
        "nativescript-geolocation": "^5.1.0",
        "nativescript-image-swipe": "^5.0.1",
        "nativescript-letter-avatar": "^0.2.0",
        "nativescript-local-notifications": "^4.1.4",
        "nativescript-localstorage": "^2.0.1",
        "nativescript-mediafilepicker": "^2.0.18",
        "nativescript-modal-datetimepicker": "^1.2.1",
        "nativescript-multi-select": "^1.0.6",
        "nativescript-ngx-fonticon": "^5.0.2",
        "nativescript-pdf-view": "^2.1.0",
        "nativescript-photo-editor": "^1.1.0",
        "nativescript-plugin-firebase": "^10.3.3",
        "nativescript-progress-notifications": "^1.0.1",
        "nativescript-ui-autocomplete": "6.0.0",
        "nativescript-ui-calendar": "6.0.0",
        "nativescript-ui-chart": "7.1.1",
        "nativescript-ui-dataform": "6.0.0",
        "nativescript-ui-gauge": "6.0.0",
        "nativescript-ui-listview": "8.0.1",
        "nativescript-ui-sidedrawer": "8.0.0",
        "nativescript-videoplayer": "^4.2.1",
        "nativescript-webrtc-plugin": "^2.0.0-alpha.19",
        "ng2-charts": "^2.3.0",
        "ngx-avatar": "^3.7.0",
        "ngx-contextmenu": "^5.3.0",
        "ngx-extended-pdf-viewer": "^1.8.4",
        "ngx-lightbox": "^2.1.1",
        "ngx-onlyoffice": "^0.0.4",
        "ngx-toastr": "^11.2.1",
        "reflect-metadata": "~0.1.13",
        "rxjs": "^6.5.4",
        "rxjs-compat": "^6.5.4",
        "tns-core-modules": "6.3.2",
        "zone.js": "0.10.2"
    },
    "devDependencies": {
        "@angular-devkit/build-angular": "0.803.21",
        "@angular/cli": "^8.3.21",
        "@angular/compiler-cli": "8.2.14",
        "@nativescript/schematics": "^1.0.0",
        "@types/jasmine": "~3.5.0",
        "@types/jasminewd2": "^2.0.8",
        "@types/node": "^12.12.21",
        "codelyzer": "~5.2.1",
        "jasmine-core": "~3.5.0",
        "jasmine-spec-reporter": "~4.2.1",
        "karma": "~4.4.1",
        "karma-chrome-launcher": "~3.1.0",
        "karma-coverage-istanbul-reporter": "^2.1.1",
        "karma-jasmine": "~2.0.1",
        "karma-jasmine-html-reporter": "^1.5.1",
        "nativescript-dev-webpack": "1.4.0",
        "node-sass": "4.13.0",
        "protractor": "~5.4.2",
        "systemjs-plugin-json": "^0.3.0",
        "tns-platform-declarations": "6.3.2",
        "ts-node": "^8.5.4",
        "tslint": "~5.20.1",
        "typescript": "3.5.3"
    },

Please, tell us how to recreate the issue in as much detail as possible.

Create a nativescript (angular) project, change app.gradle to the provided one and add android.enableDexingArtifactTransform.desugaring=false to the App_Ressources/Android/gradle.properties.

Is there any code involved?

See above

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions