Logs not appearing in Steroids Connect


#1

No matter what I do - I can’t seem to get any logs to appear in Steroids Connect. I am using the examples straight from the docs, and my view gets rendered, but literally none of these appear under the logging tab. What gives?: https://gist.github.com/anwyatt/43e11e575776067914c2


#2

Are you getting any js errors if you were to debug in safari or chrome? I read in this forum that the Logger isn’t really working properly at the moment. It is intermittent for me, but works most of the time.


#3

Tons, actually. this one pops up every few seconds: https://docs.angularjs.org/error/$rootScope/infdig


#4

Is there some more code you can post? Are you including the $rootScope in your controller or is this possibly an issue that is happening in a default installation?


#5

I’m not including $rootScope in my controller, those errors are what I am seeing in I open the javascript console in chrome on the logs page. I have tried adding $rootScope just now and am still seeing the error in chrome.


#6

Are you able to post your controller code here?


#7

sure:

angular
.module(‘dashboard’)
.controller(‘MainController’, function($scope, supersonic, Classroom) {
$scope.rooms = [];
$scope.activeRoom = {};

    console.log('boom');
    supersonic.logger.log("Something semi-interesting just happened.");
    supersonic.logger.info("Something semi-interesting just happened.");
    supersonic.logger.debug("Doing something pretty detailed here.");
    supersonic.logger.warn("Form was submitted with null value.");
    supersonic.logger.error("Uh-oh, bad stuff happened!");

    $scope.makeNoise = function(msg) {
        var msgToDisplay = (msg === undefined) ? 'boom!' : msg;
        supersonic.ui.dialog.alert(msgToDisplay);
    }
});

#8

Sorry, I forgot that you had already included it in the first post in a link.

Everything looks ok. If you remove the Classroom reference, does it go away?


#9

The errors. No - unfortunately. And the weird thing is - despite the errors in the console, the thing builds okay.


#10

I am curious if you get the same issues on a fresh install / create project. Do you run steroids update on your projects often?


#11

I ran it today, actually. I found an article where the poster’s problem was resolved after switching to NVM (I hadn’t been using NVM). After installing NVM/Node I reinstalled/updated steroids.

I have also been wondering the same thing. I think I am running out of options - I think my next step is to try starting a new project and giving this a shot. If that works, I will just move components from this project over one at a time until something breaks (or I move it all and have a working project).


AppGyver community dead? Support? Chat?
#12

I’d be interested to see your results. I have read about this issue before and couldn’t remember how to find it.


#13

This is a similar post here: Logs


#14

We have the same issue on five different Macs here - 95% of the time no logs displayed in the Connect Logs tab - looking at the debug console shows an error being through 5 - 6 x per second from Angular.


#15

Working in an Ubuntu 14.04 64 bits, I can’t see logs either. In the browser console, I’ve got the same problem than AppArchitects. The same goes when testing a fresh project. (Tested on Google Chrome and Firefox).


#16

The work around we use currently (Mac OSX Yosemite, iOS debugging via simulator, Safari for debugging) is to start steroids connect with the experimental “livereload” flow:


> steroids connect --livereload

Then we start the iOS simulator and Safari for debugging, go to the page we’re debugging (in the simulator) and choose the same page from the Safari “Developer -> iOS Device” menu. E.g. if we’re debugging the “login” view in simulator then we load the same page from the Safari debugger menu.

Once that has all loaded you can view the Console tab in the Safari debugger and then simply re-save your JS source file to re-load the view in the same location and without closing the debugger – you can then use console.log to debug.


console.log('my error message here');

Not ideal but much better than having nothing currently with the logging not working.

P.S. also works for fiddling with the CSS styles and HTML within Safari dev tools :slight_smile:


#17

I must find if I can do something similar with android emulator.


#18

Any update on this, I have seen multiple threads and no firm resolution. Thanks for any info. (I am on Mac OSX El Capitan, using iphone emulator and running steroids connect --no-watch)