Ionic: All my observables send back error on Safari ios with TypeError: null is not an object (evaluating 'this._parentSubscriber.unsubscribe')


#1

Hi,
All my observable are sending this error on ios Safari.

The error is:

TypeError: null is not an object (evaluating 'this._parentSubscriber.unsubscribe')

I get those with any subscription to an observable. For example:

import { Component, ElementRef, Input } from '@angular/core';
import { THEME_DIR } from '../../app.settings';
import { Log } from 'ng2-logger';
import { Http } from '@angular/http';

@Component({
    selector: 'mzk-svg',
    template: '<ng-template></ng-template>',
})
export class MzkSvgDirective {

    private log = Log.create('SvgDirective');

    constructor(private http: Http, private el: ElementRef) {
    }

    @Input()
    set svg(value: string) {
        this.log.info(value);
        let imgUrl = THEME_DIR + 'svg/' + value + '.template.svg';
        this.http.get(imgUrl).subscribe(
            (content) => {
                this.log.info('content', content);
                this.el.nativeElement.innerHTML =  content.text();
            },
            (error) => {
                this.log.error('Couldn\'t retrieve:', imgUrl, error);
            },
            () => {
                this.log.info('complete');
            },
        );
    }
}

dependencies:
"@agm/core": “^1.0.0-beta.0”,
"@angular/animations": “4.4.3”,
"@angular/cdk": “2.0.0-beta.11”,
"@angular/common": “4.4.3”,
"@angular/compiler": “4.4.3”,
"@angular/compiler-cli": “4.4.3”,
"@angular/core": “4.4.3”,
"@angular/forms": “4.4.3”,
"@angular/http": “4.4.3”,
"@angular/material": “2.0.0-beta.11”,
"@angular/platform-browser": “4.4.3”,
"@angular/platform-browser-dynamic": “4.4.3”,
"@angular/tsc-wrapped": “4.4.3”,
"@ionic-native/app-availability": “^4.3.0”,
"@ionic-native/app-version": “^4.3.1”,
"@ionic-native/core": “^4.2.0”,
"@ionic-native/device": “^4.3.1”,
"@ionic-native/device-orientation": “^4.3.1”,
"@ionic-native/ibeacon": “^4.3.1”,
"@ionic-native/in-app-browser": “^4.3.0”,
"@ionic-native/screen-orientation": “^4.3.1”,
"@ionic-native/splash-screen": “4.0.0”,
"@ionic-native/status-bar": “^4.3.1”,
"@ionic/cli-plugin-ionic-angular": “^1.4.1”,
"@ionic/pro": “^1.0.9”,
"@ionic/storage": “2.0.1”,
“rxjs”: “^5.5.0”,

cli packages: (/Users/millerf/Documents/www/Mozaik/mzk_app/node_modules)

@ionic/cli-utils  : 1.13.1
ionic (Ionic CLI) : 3.13.1

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 3.0.0
Cordova Platforms  : ios 4.5.2
Ionic Framework    : ionic-angular 3.7.1

System:

ios-sim : 6.1.2 
Node    : v6.11.1
npm     : 5.5.1 
OS      : macOS Sierra
Xcode   : Xcode 9.0 Build version 9A235 

Misc:

backend : legacy