GithubHelp home page GithubHelp logo

Comments (11)

RyanRusnak avatar RyanRusnak commented on August 16, 2024

It looks like the create button is throwing a JS error:

Uncaught SyntaxError: Unexpected token u
createPattern   @   options.js:181

savedPatterns is undefined and I think that is causing the error. I think every new user will have no saved patters though. I tried adding one and still experienced the error so maybe they are not being persisted.

from mindtheword.

ceilican avatar ceilican commented on August 16, 2024

Hi Ryan! Thanks for the information. I am still not able to reproduce the error in my computer. Therefore, I rely on people like you, who can provide more information about the error. I agree with you that this bug must be due to a persistence error, but I wonder why it is happening only to a few users. Do you have any idea?

from mindtheword.

RyanRusnak avatar RyanRusnak commented on August 16, 2024

You are right. Locally, the plugin works perfectly. However, installing from the chrome store causes an error. See attached screenshots for each:
screen shot 2015-09-14 at 12 39 30 pm
screen shot 2015-09-14 at 12 39 43 pm

from mindtheword.

Stormteller avatar Stormteller commented on August 16, 2024

I got this error, when I had tried to turn app on, before I visited options page after installation (I installed it locally). But after I had created config and opened page, nothing have changed, no one word was highlighted.

from mindtheword.

ankit-m avatar ankit-m commented on August 16, 2024

There was a null case error (S('savedPatterns') was referencing to undefined) in createPattern function. As a result new configurations could not be created. I have fixed this issue and also added duplicate configuration handling. Pull request #65

from mindtheword.

rohankatyal29 avatar rohankatyal29 commented on August 16, 2024

@ankit-m : How did you reproduce this issue?

from mindtheword.

ceilican avatar ceilican commented on August 16, 2024

It is still puzzling that S('savedPatterns') ever references to "undefined". This should never happen. Pull request #65 is good, because it makes the extension more resistant to such "undefined" cases, but we still don't know why it is "undefined" sometimes (and only for a few users).

from mindtheword.

ankit-m avatar ankit-m commented on August 16, 2024

@ceilican this occurs during cold start. When a user first installs the extension, only then they get this error. The savedPatterns variable is undefined in the first go, which causes an exception.

Here is the original error in the extension downloaded from webstore.
error

The problem is with this snippet

  if (data == null || JSON.stringify(data) == '{}') { // in this case, storage was not initialized yet
        console.log('setting storage to defaultStorage (stringified): ');
        console.log(JSON.stringify(defaultStorage));
        storage.set(defaultStorage);
        d = defaultStorage;

data is NOT null NEITHER {} because it has activation: true. As a result d is not set to defaultStorage. So if someone downloads, and turns on, defaultStorage is never set. This is causing variables to be undefined. I will solve this and raise a pull request.

from mindtheword.

ceilican avatar ceilican commented on August 16, 2024

But why does this happen only to some users?

from mindtheword.

ankit-m avatar ankit-m commented on August 16, 2024

Because only some people turn on right after installation, before going to options page which sets the activation field in data object. As a result some get the error rest do not. Should I go ahead and fix this?

from mindtheword.

ceilican avatar ceilican commented on August 16, 2024

Yes, please go ahead!

from mindtheword.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.