widgets icon indicating copy to clipboard operation
widgets copied to clipboard

Uncaught Error: could not find react-redux context value; please ensure the component is wrapped in a <Provider>

Open kirbyhipona opened this issue 3 years ago • 11 comments

I tried to integrate the Uniswap Widget from the documentation and fix several bugs and errors and still no luck. I was wondering why I should do the React-Redux. I followed the documentation of the widget. I already tried the Redux but nothing works. Please I need help.

kirbyhipona avatar Sep 07 '22 03:09 kirbyhipona

@kirbyhipona Can you please clarify steps to reproduce the issue you're seeing?

akarys92 avatar Sep 14 '22 22:09 akarys92

Having the same issue. Was working fine before, and with no change in the code, receiving the same error with broken component. My widget code looks like this:

import { SwapWidgetProps, SwapWidget } from '@uniswap/widgets';
import '@uniswap/widgets/fonts.css';

export function UniswapWidget(props: SwapWidgetProps) {
  return (
    <div className="Uniswap">
      <SwapWidget width={567} {...props} />
    </div>
  );
}

Error reads: Screen Shot 2022-09-26 at 5 48 53 PM

Widget rendered like this: Screen Shot 2022-09-26 at 5 50 28 PM

luizkc avatar Sep 26 '22 21:09 luizkc

I solved the problem by downgrading the Uniswap Version. I used "@uniswap/widgets": "2.1.1". Maybe you can use the most updated one. Try to look for the best version of your environment.

kirbyhipona avatar Sep 27 '22 05:09 kirbyhipona

I'm using version 2.7.0, the version that last worked for me, but having this issue. Any suggestions for which version to use? @kirbyhipona

luizkc avatar Sep 27 '22 13:09 luizkc

I try 2.6.0 and its work

Luknam avatar Sep 27 '22 14:09 Luknam

Tried 2.6.0, receiving the same error

luizkc avatar Sep 27 '22 14:09 luizkc

I try react : 18.2.0 react-dom : 18.2.0 react-redux : 7.2.9 and @uniswap/widget 2.8.1, it work fine, probably caused by react-redux version.

11best avatar Sep 28 '22 09:09 11best

Downgraded my react-redux from 8.x.x to 7.2.9 and widget is working as expected. Thanks @11best

luizkc avatar Sep 28 '22 15:09 luizkc

Hi! Good day!

I solved the problem by downgrading the Uniswap Version.

Regards, Kirby

On Tue, Sep 27, 2022 at 5:51 AM luizkc @.***> wrote:

Having the same issue. Was working fine before, and with no change in the code, receiving the same error with broken component. My widget code looks like this:

import { SwapWidgetProps, SwapWidget } from @./widgets';import @./widgets/fonts.css'; export function UniswapWidget(props: SwapWidgetProps) { return ( <div className="Uniswap"> <SwapWidget width={567} {...props} /> );}

Error reads: [image: Screen Shot 2022-09-26 at 5 48 53 PM] https://user-images.githubusercontent.com/44825405/192386831-a2bf2da1-70cb-4679-afe3-44f5c91b837e.png

Widget rendered like this: [image: Screen Shot 2022-09-26 at 5 50 28 PM] https://user-images.githubusercontent.com/44825405/192387072-e2b4a141-2594-47cc-ac83-9e7037642b8b.png

— Reply to this email directly, view it on GitHub https://github.com/Uniswap/widgets/issues/192#issuecomment-1258675011, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMR6PUCBXBE5LEKYCDHEJATWAILFRANCNFSM6AAAAAAQGL4I5I . You are receiving this because you were mentioned.Message ID: @.***>

kirbyhipona avatar Oct 11 '22 07:10 kirbyhipona

I solved this by upgrading my react-redux, i went from 7.2.6 to 8.0.0. Im using "@uniswap/widgets": "^2.40.0"

Dashon avatar Feb 25 '23 13:02 Dashon

No need to downgrade, this is the same issue and can be fixed the same way as here: https://github.com/Uniswap/widgets/issues/404#issuecomment-1450756249

marcinciarka avatar Mar 03 '23 10:03 marcinciarka