Skip to content
This repository has been archived by the owner on Sep 16, 2020. It is now read-only.

[ React Native ] "Your browser does not have secure random generator. If you don’t need unpredictable IDs, you can use nanoid/non-secure." #27

Closed
naomiHauret opened this issue May 10, 2019 · 13 comments · Fixed by #34
Assignees
Labels
bug Something isn't working 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted Extra attention is needed

Comments

@naomiHauret
Copy link

naomiHauret commented May 10, 2019

Issuehunt badges

Hi ! First of all, thanks for all the work you did on redux-symbiote. It's a wonderful lib, writing redux-related code has never been so easy.
I'm developing 2 apps in React Native with Expo, and of course, redux-symbiote.
I upgraded redux-symbiote version from v3.0.2 to v3.1.0 and had this error since :

Your browser does not have secure random generator. If you don’t need unpredictable IDs, you can use nanoid/non-secure.

I tried replacing const nanoid = require("nanoid") with const nanoid = require("nanoid/non-secure") in src/index.js but it didn't do the trick.

My workaround was to rollback to v3.0.2 to get both my apps working again.


IssueHunt Summary

kldkv kldkv has been rewarded.

Backers (Total: $5.00)

Submitted pull Requests


Tips


IssueHunt has been backed by the following sponsors. Become a sponsor

@sergeysova sergeysova added the bug Something isn't working label May 13, 2019
@sergeysova sergeysova self-assigned this May 13, 2019
@sergeysova
Copy link
Owner

@naomiHauret thanks

@sergeysova
Copy link
Owner

I don't have react-native project, but you can help us with debug that file:

https://github.com/sergeysova/redux-symbiote/blob/master/src/nanoid.js

@afflicted-cat
Copy link

afflicted-cat commented Jul 7, 2019

https://github.com/sergeysova/redux-symbiote/blob/master/src/nanoid.js works fine.

The problem is that in NPM not loaded version 3.2 (which contains this fix)

@sergeysova
Copy link
Owner

@sergeysova
Copy link
Owner

sergeysova commented Jul 14, 2019

@weyheyhey Please, check is the problem solved

@afflicted-cat
Copy link

@sergeysova Problem solved. Thank you)

@yyynnn
Copy link

yyynnn commented Aug 4, 2019

@sergeysova Still it also breaks in ie10 💩

Which is supported or not?
Browserlist could be added to indicate that.

@sergeysova sergeysova reopened this Aug 5, 2019
@sergeysova sergeysova added the help wanted Extra attention is needed label Aug 5, 2019
@sergeysova
Copy link
Owner

@yyynnn redux-symbiote is not tested in ie10.
What error you have? Maybe create a new issue?

@sergeysova sergeysova pinned this issue Oct 18, 2019
@sergeysova sergeysova unpinned this issue Oct 18, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Oct 25, 2019

@sergeysova has funded $5.00 to this issue.


@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Oct 25, 2019
@kldkv
Copy link

kldkv commented Oct 29, 2019

I checked with browserstack. IE10, IE9 works. As an option, temporarily use the third argument in createSymbiote.

import { createStore } from 'redux'
import { createSymbiote } from "redux-symbiote";

const initialState = 0;

const symbiotes = {
  INCREMENT: state => state + 1,
  DECREMENT: state => state - 1
};

const { actions, reducer } = createSymbiote(
  initialState,
  symbiotes,
  "accounts/loading"
);

const store = createStore(reducer);

console.log(`Should be 0: ${store.getState()}`)
store.dispatch(actions.INCREMENT())
store.dispatch(actions.INCREMENT())
store.dispatch(actions.INCREMENT())
store.dispatch(actions.DECREMENT())
console.log(`Should be 2: ${store.getState()}`)

console.log(store, actions)

Скриншот 2019-10-30 01 45 18
Скриншот 2019-10-30 01 46 48

@sergeysova
Copy link
Owner

@kldkv Thank you!

@sergeysova sergeysova reopened this Nov 1, 2019
sergeysova added a commit that referenced this issue Nov 7, 2019
Close #27. Nanoid/non-secure for old ie
@sergeysova sergeysova reopened this Nov 7, 2019
@issuehunt-oss
Copy link

issuehunt-oss bot commented Nov 7, 2019

@sergeysova has rewarded $4.50 to @kldkv. See it on IssueHunt

  • 💰 Total deposit: $5.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $0.50

@issuehunt-oss issuehunt-oss bot added 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt and removed 💵 Funded on Issuehunt This issue has been funded on Issuehunt labels Nov 7, 2019
@sergeysova
Copy link
Owner

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants