Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread DOM Exception Error (iphone browser)
Sat, Apr 23 2016 11:43 PMPermanent Link

kamran

Hi

I started to make use of localstorage in my ewb code and it looks as if it does not like it when launched from an iphone.

I get this error.

“QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.”

I found this stackoverflow link that might help  - note sure ?

http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an

Anybody come across this before ? and could shed some light.

Thanks


Kamran
Sun, Apr 24 2016 4:06 AMPermanent Link

Matthew Jones

<kamran> wrote:
> Hi
>
> I started to make use of localstorage in my ewb code and it looks as if
> it does not like it when launched from an iphone.
>
> I get this error.
>
>  “QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add
> something to storage that exceeded the quota.”
>
> I found this stackoverflow link that might help  - note sure ?
>
> http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an
>
> Anybody come across this before ? and could shed some light.
>

How much data are you trying to store? Are you using anonymous mode?  I
know there is a limit to the storage, and by pinning to the main screen you
can make that bigger.

--
Matthew Jones
Sun, Apr 24 2016 5:16 AMPermanent Link

kamran

Hi Matthew

Just to clarify:
So this appears only to happen on an iphone.
Running in my normal firefox browser and the EWB IDE works ok.

1. I have a max of 20 variables with a max string value of 30 chars
So that makes it a max of 600 chars in total to store. ( it is actually less )

2. On my iphone i am using:
a.  block pop up option
b.  do not track (this is probably the anonymous option..)

3. At startup I am only saving about 5 x 30 chars that would be max 150 chars.
Later on yes, I am storing more. But never mor than 600 chars.

Regards

Kamran

---------------------------------------------------
Matthew Jones wrote:

How much data are you trying to store? Are you using anonymous mode?  I
know there is a limit to the storage, and by pinning to the main screen you
can make that bigger.

--
Matthew Jones
Sun, Apr 24 2016 4:44 PMPermanent Link

Matthew Jones

<kamran> wrote:
> Hi Matthew
>
> Just to clarify:
> So this appears only to happen on an iphone.
> Running in my normal firefox browser and the EWB IDE works ok.
>
> 1. I have a max of 20 variables with a max string value of 30 chars
> So that makes it a max of 600 chars in total to store. ( it is actually less )
>
> 2. On my iphone i am using:
> a.  block pop up option
> b.  do not track (this is probably the anonymous option..)
>
> 3. At startup I am only saving about 5 x 30 chars that would be max 150 chars.
> Later on yes, I am storing more. But never mor than 600


Do you have a Mac? If so you can use it to find out what is happening in
the running code on the iPhone. That would be the best way to find it
precisely. Otherwise I'd do some simple experiments to see what triggers
it.

--
Matthew Jones
Mon, Apr 25 2016 3:58 AMPermanent Link

Matthew Jones

This is an interesting possible solution:

https://github.com/marcuswestin/store.js/issues/42#issuecomment-4849403

Well, a way to stop it happening. I don't think your conditions fit the
private browsing, but obviously something is triggering it.

--

Matthew Jones
Mon, Apr 25 2016 7:50 AMPermanent Link

kamran

HI Matthew

Thanks for investigating further.

The links do point to an issue with safari and local storage in private mode.

Perhaps you cannot use local storage in Safari in private mode.

I guess Tim might look at this and a possible solution,
once he has looked at the EWB source code.

Cheers

Kamran

"Matthew Jones" wrote:

This is an interesting possible solution:

https://github.com/marcuswestin/store.js/issues/42#issuecomment-4849403

Well, a way to stop it happening. I don't think your conditions fit the
private browsing, but obviously something is triggering it.

--

Matthew Jones
Mon, Apr 25 2016 9:33 AMPermanent Link

Matthew Jones

kamran wrote:

> Perhaps you cannot use local storage in Safari in private mode.

This much is certain, but it doesn't affect normal operation. I just
did a quick test to check, and an EWB application can store data just
fine (and retrieve). Only when I go into the Safari Private mode, which
is quite hard to do really without knowing, does this issue happen. And
since you have asked for it to be private, it makes sense that the
application can't store data as it could be used to track you, and it
will disappear at the end of the session.

If operating in private mode is important, then detect the problem and
just don't store it - use a global variable instead.

What would be good is for EWB to surface the .disabled property, so we
can easily check that it is not available.

--

Matthew Jones
Mon, Apr 25 2016 11:30 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< What would be good is for EWB to surface the .disabled property, so we can easily check that it is not available. >>

Noted.

Tim Young
Elevate Software
www.elevatesoft.com
Sun, Jun 5 2016 2:27 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Matthew,

<< What would be good is for EWB to surface the .disabled property, so we can easily check that it is not available. >>

Okay, wrapping up all dangling 2.05 issues, and need some clarification here.  Which "disabled" property are you referring to ?  As far as I can tell, the only way to test for this situation is to use a try..except around a Set call.

Tim Young
Elevate Software
www.elevatesoft.com
Sun, Jun 5 2016 2:45 PMPermanent Link

Matthew Jones


> Okay, wrapping up all dangling 2.05 issues, and need some clarification
> here.  Which "disabled" property are you referring to ?  As far as I can
> tell, the only way to test for this situation is to use a try..except around a Set call.

The GitHub link mentions store.disabled. Looks ideal.

--
Matthew Jones
Page 1 of 2Next Page »
Jump to Page:  1 2
Image