question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ionic & Sentry: Error encountered resolving symbol values statically.

See original GitHub issue

Do you want to request a feature or report a bug? Reporting a bug

(If this is a usage question, please do not post it here—post it on forum.sentry.io instead. If this is not a “feature” or a “bug”, or the phrase “How do I…?” applies, then it’s probably a usage question.)

What is the current behavior? Application will not compile with ngc once Sentry is added.

[16:17:08]  ionic-app-script task: "build" 
[16:17:08]  Error: Error encountered resolving symbol values statically. Reference to a non-exported class 
            RavenExceptionHandler. Consider exporting the class (position 85:1 in the original .ts file), resolving 
            symbol AppModule in /home/devbox/code/app/src/app/app.module.ts

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar.

What is the expected behavior? Application will run and then compile for distribution.

Which versions of Raven.js, 3.15.0 and which browser and OS none are affected by this issue? Did this work in previous versions of Raven.js? did not attempt Are you using the CDN (http://ravenjs.com)? no Are you using hosted Sentry yes or on-premises? no If on-premises, which version (e.g. 8.7.0)? N/A

3.15.0 Browser and OS irrelevant. This is a build in ionic-cli for distribution as a native app. The build is happening in Ubuntu Server 16.04.

  "dependencies": {
    "@agm/core": "^1.0.0-beta.0",
    "@angular/common": "4.0.2",
    "@angular/compiler": "4.0.2",
    "@angular/compiler-cli": "4.0.2",
    "@angular/core": "4.0.2",
    "@angular/forms": "4.0.2",
    "@angular/http": "4.0.2",
    "@angular/platform-browser": "4.0.2",
    "@angular/platform-browser-dynamic": "4.0.2",
    "@ionic-native/app-version": "^3.6.1",
    "@ionic-native/core": "^3.6.1",
    "@ionic-native/geolocation": "^3.6.1",
    "@ionic-native/splash-screen": "^3.6.1",
    "@ionic-native/status-bar": "^3.6.1",
    "@ionic/storage": "^2.0.1",
    "ionic-angular": "^3.1.1",
    "ionicons": "^3.0.0",
    "raven-js": "^3.15.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "^3.6.0",
    "zone.js": "^0.8.10"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^1.3.6",
    "typescript": "^2.2.1"
  },

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
benvinegarcommented, May 31, 2017

Also I had to use Raven.captureException(err); instead of Raven.captureException(err.originalError);

Thanks. I’ll update the docs.

1reaction
b264commented, May 31, 2017

I got it to work with

import * as Raven from 'raven-js';

// ...

Raven
  .config('semi-secret stuff')
  .install();

export class RavenErrorHandler implements IonicErrorHandler {
  handleError(err:any) : void {
    Raven.captureException(err);
  }
}

// ...

@NgModule({

// ...

  providers: [
    {provide: ErrorHandler, useClass: RavenErrorHandler},

in app.module.ts

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error encountered resolving symbol values statically
I was trying to build an APK for my app using ionic cordova build android --prod --release but I'm getting the following error...
Read more >
Error encountered resolving symbol values statically #1618
Thanks for the issue! This issue appears to be associated with an old version of the Ionic CLI. Please update to the latest...
Read more >
ERROR in Error encountered resolving symbol values ...
ERROR in Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda ...
Read more >
Using Sentry - Error Monitoring with Ionic Angular Applications
In this tutorial, we will see how we can integrate Sentry — Error Monitoring with the Ionic Angular application. Why Error Monitoring is...
Read more >
Ionic Forum - Latest posts - RSSing.com
[18:02:12] build prod failed: Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found