jthei/simple-task-timer

Does not work on cr-48 chromebook

Closed this issue · 5 comments

What steps will reproduce the problem?
1. Load app from Chrome Web Store
2. Start app
3. Goes to start page, but no way to enter or start anything.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?
Running Chrome 11.0.696.57 browser in Ubuntu 11.04 on cr-48 chromebook

Please provide any additional information below.


Original issue reported on code.google.com by richardt...@gmail.com on 2 Jan 2012 at 6:20

Attachments:

Could you load it up again, click on the wrench menu, hover over tools, and 
click JavaScript Console? Then, click on the little arrow next to the red error 
(if there is an arrow), and copy everything it says?
Thanks.

Original comment by Gawdl3y on 2 Jan 2012 at 9:58

/ Format the time to the format h:mm:ss
function format_time(hours, mins, secs, indef) {
    if(indef) return locale('indefinite');

    if(hours == null) hours = 0;
    if(mins == null) mins = 0;
    if(secs == null) secs = 0;

    return hours.toString() +':'+ (mins < 10 ? '0' : '') + mins.toString() +':'+ (secs < 10 ? '0' : '') + secs.toString();
}

// Return or set the value of a setting
function setting(name, value, only_not_exists) {
    if(typeof only_not_exists == 'undefined') only_not_exists = false;

    // Check if the setting exists
    var exists;
    if(typeof localStorage[name] == 'undefined') {
        exists = false;
    } else {
        exists = true;
    }

    // Set the setting
    if(typeof value != 'undefined' && ((exists && !only_not_exists) || (!exists && only_not_exists))) {
        if(typeof value.toString() != 'undefined') {
            localStorage[name] = value.toString();
        } else {
            localStorage[name] = value;
        }

        return value;
    } else {
        // Return the value
        value = localStorage[name];
        if(value == 'true') return true;
        if(value == 'false') return false;
        if(!isNaN(parseInt(value))) return parseInt(value);
        return value;
    }
}

// Get a single locale string
function locale(messageID, args) {
    var i18n = chrome.i18n.getMessage(messageID, args);
    return i18n != '' ? i18n : messageID;
}

// Localise page
function localisePage() {
    var text_tags = ['DIV', 'P', 'TD', 'TH', 'SPAN', 'OPTION', 'A', 'BUTTON', 'H1', 'H2', 'H3', 'TITLE'];

    $('[i18n]').each(function(i, v) {
        var i18n = locale($(this).attr('i18n'));

        if($.inArray($(this)[0].tagName, text_tags) != -1) $(this).text(i18n);
        if($(this).attr('title')) $(this).attr('title', i18n);
        if($(this).attr('alt')) $(this).attr('alt', i18n);
        if($(this).attr('placeholder')) $(this).attr('placeholder', i18n);
    });
}

// Error handler
function error_notice(error, url, line) {
    if(!errord) {
        var trace = false;

        // See if we're coming from try...catch or window.onerror
        if(typeof error.message != 'undefined') {
            msg = error.message;
            url = error.url;
            line = error.number;
            trace = true;
        } else {
            msg = error;
        }

        // Stop timers
        clearTimeout(timer);
        clearTimeout(save_timer);

        // Print error
        $('#js-error h3').text(locale('errorNotice'));
        $('#error-info').html('<strong>App Version:</strong> '+ chrome.app.getDetails().version +'<br />');
utilities.js:84Uncaught TypeError: Object [object Object] has no method 
'getDetails'
        $('#error-info').append('<strong>Error Message:</strong> '+ msg +'<br />');
        if(!trace) $('#error-info').append('<strong>URL:</strong> '+ url +'<br />');
        if(!trace) $('#error-info').append('<strong>Line number:</strong> '+ line +'<br />');
        if(trace) $('#error-info').append('<strong>Stack trace:</strong><br />'+ printStackTrace({e: error}).join('<br />') +'<br />');
        $('#error-info').append('<strong>localStorage:</strong><br />'+ JSON.stringify(localStorage));

        // Make sure the error message is visible
        $('#tasks, #charts, .modal').hide();
        $('#js-error').show();

        // Alert only once
        if(!errord) {
            errord = true;
            alert(locale('errorOccurred'));
        }
    }
}

Original comment by richardt...@gmail.com on 4 Jan 2012 at 3:52

Original comment by richardt...@gmail.com on 4 Jan 2012 at 3:55

Attachments:

I meant to just copy the error at the bottom, but that screenshot works quite 
well too. :P
As for the error, I just realised what is causing it. You're using an extremely 
old version of Chrome/Chromium. You're on Chrome 11, which doesn't even have 
app functionality. If you upgrade Chrome/Chromium, it is sure to work.

Original comment by Gawdl3y on 4 Jan 2012 at 4:00

Changing status to invalid, because it's caused by a very old version of Chrome.

Original comment by Gawdl3y on 10 Jan 2012 at 8:07

  • Changed state: Invalid