java.lang.IllegalStateException

System services not available to Activities before onCreate()

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web109

  • via GitHub by DineshKumar7
    ,
  • via Stack Overflow by John
    ,
  • Stack trace

    • java.lang.IllegalStateException: System services not available to Activities before onCreate() at android.app.Activity.getSystemService(Activity.java:5315) at sh.calaba.instrumentationbackend.utils.WindowManagerWrapper.getWindowManagerFromContext(WindowManagerWrapper.java:32) at sh.calaba.instrumentationbackend.utils.WindowManagerWrapper.fromContext(WindowManagerWrapper.java:22) at sh.calaba.instrumentationbackend.query.ast.UIQueryUtils.getRootViews(UIQueryUtils.java:201) at sh.calaba.instrumentationbackend.automation.CalabashAutomationEmbedded.getRootViews(CalabashAutomationEmbedded.java:32) at sh.calaba.instrumentationbackend.automation.CalabashAutomationEmbedded.getRootViews(CalabashAutomationEmbedded.java:13) at sh.calaba.instrumentationbackend.InstrumentationBackend.getRootViews(InstrumentationBackend.java:55) at sh.calaba.instrumentationbackend.query.Query.rootViews(Query.java:172) at sh.calaba.instrumentationbackend.query.Query.executeQuery(Query.java:56) at sh.calaba.instrumentationbackend.actions.HttpServer.serve(HttpServer.java:575) at sh.calaba.instrumentationbackend.actions.NanoHTTPD$HTTPSession.run(NanoHTTPD.java:487)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown visitor
    Unknown visitorOnce,
    kumar ranjankumar ranjan
    Once,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    1 more bugmates