Comments (11)
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.
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.
You are right. Locally, the plugin works perfectly. However, installing from the chrome store causes an error. See attached screenshots for each:
from mindtheword.
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.
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.
@ankit-m : How did you reproduce this issue?
from mindtheword.
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.
@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.
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.
But why does this happen only to some users?
from mindtheword.
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.
Yes, please go ahead!
from mindtheword.
Related Issues (20)
- Dropdown width is varying HOT 3
- When a new pattern is created, the new pattern should be automatically selected HOT 4
- Blocking of Duplicate Patterns should not be silent HOT 1
- Social Media icons in options page should not be underlined when mouse hovers HOT 2
- Wrong visual hints HOT 1
- Breaking user defined translations HOT 1
- Make "one word per sentence" option local (per pattern)
- Blacklisted words are getting translated HOT 4
- Esperanto is available in Yandex's website, but not in MTW when Yandex is selected
- When Options page is opened, some words are spoken HOT 3
- Dropdown for "Voice Name" does not fit in the "Playback Settings" box HOT 3
- Use the alternative API for Google Translate HOT 12
- It appears as MindTheWord is not working on some Australian news sites HOT 5
- No Hindi translation listed with yandex api
- Add keyboard shortcuts for the MTW functionality HOT 7
- Update changes from dist folder to lib folder HOT 1
- Error: (SystemJS) XHR error on Linux HOT 12
- translation Russian>Spanish not working for some russian sites HOT 1
- Move Bing Translation to Azure Translation HOT 1
- Pressing Enter on User Defined Translations Saves the Current Input
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mindtheword.