Giter Club home page Giter Club logo

snack's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snack's Issues

Importing GitHub repository which uses the `main` branch fails

image

when i try to use Import git repository in snack to edit my react native project this error is displayed :
An error occurred during import. This could be because the data provided was invalid, or because the repository referenced is not a properly formatted Expo project.

react-firebase-hooks fails to resolve on Snack

Summary

Adding react-firebase-hooks to a new Snack returns this error and making it unusable:

Failed to resolve dependency 'react-firebase-hooks@*' (Can't resolve '' in '/tmp/snackager/snackager/buildStatus/1/[email protected],android,web/package')

What platform(s) does this occur on?

Android, iOS, Web

SDK Version

40/41

Reproducible demo or steps to reproduce from a blank project

Add import "react-firebase-hooks" to a new Snack. No import necessary

https://snack.expo.io/@peterpme/20b3d4

Please don't suppress react native warnings

Hi. I love snack but this irks me. I was trying to showcase a RN warning to a react developer who doesn't use RN. He asked me for a minimal implementation.

So I've made a Snack... and found out the warning is not shown in your console.

I accept that you removed YellowBox from your fork, but please show the same warnings in your console. Snack is the only RN playground at the moment, so I think it's pretty important.
Thanks.

PropType Validation Bug

I originally created this issue on the expo repository and a Samaritan who goes by wodin said it would be better moving it to this repository.

The issue I have been experiencing is not seeing a yellow warning box on snack when I pass an incorrect Proptype.

Below is the link to the snack that demonstrates the problem:
https://snack.expo.io/@alishehzad/no-warning-for-incorrect-proptype

Here count is validated in 'Count.js' and exported to 'App.js'.

This works fine locally. Just not in a snack.

Snack Bug regarding PropType Validation?

I originally created this issue on the expo repository and a Samaritan who goes by wodin said it would be better moving it to this repository.

The issue I have been experiencing is not seeing a yellow warning box on snack when I pass an incorrect Proptype.

Below is the link to the snack that demonstrates the problem:
https://snack.expo.io/@alishehzad/no-warning-for-incorrect-proptype

Here count is validated in 'Count.js' and exported to 'App.js'.

This works fine locally. Just not in a snack.

Following is the link to the original question: https://forums.expo.io/t/proptype-validation-on-snack/30580

error when import snack project from github

when i try to use Import git repository in snack this error is displayed : An error occurred during import. This could be because the data provided was invalid, or because the repository referenced is not a properly formatted Expo project.

my public github link is : https://github.com/saeedjafary/SarvShop

I am seeing this error recently. there was no problem before

[website] ResizeObserver loop limit exceeded

Summary

image

app.bundle.js:109 [Util] handleError:: ResizeObserver loop limit exceeded
13:01:23.435 app.bundle.js:109 [Util] handleError:: ResizeObserver loop limit exceeded
13:01:26.985 app.bundle.js:109 [Util] handleError:: ResizeObserver loop limit exceeded

Background info here: maslianok/react-resize-detector#45

What platform(s) does this occur on?

Android, iOS, Web

SDK Version

42

Reproducible demo or steps to reproduce from a blank project

To reproduce:

The error does not show up in development by default, but is detected by segment/rudderstack.
To visualizer the error:

  • Add window?.addEventListener('error', function (e) { console.error(e); }); somewhere to the website code
  • yarn start (in root)
  • Resize the browser

Happened on this Snack, but could have been any I think:
https://snack.expo.dev/@hein_expo/shared-element-2?verbose=true

Preview pane open: MyDevice
Browser: Chrome (mac)

Access to origin forbidden

I have React.js project which I want to show expo app as preview via iframe on it. Everything works well in localhost but remote. When I enabled verbose getting Access to origin "https://dev.admin.woo2app.com is forbidden on browser console.. I enabled CORS bu by adding header add to .htaccess and I checked it by https://www.test-cors.org/ it looks like working. I also tried firefox extension but same.

What platform(s) does this occur on?
Web

SDK Version
40

Error with Reanimated v2

Summary

Even creating a blank project where I just import Animated from 'react-native-reanimated'; causes an error on Android ("Uncaught Error: Animated node with ID 2 already exists").
This only happen on Android, and only on Snack, if I build the same project on my local machine, I don't seem to have any problem.

What platform(s) does this occur on?

Android

SDK Version

v41.0.0

Reproducible demo or steps to reproduce from a blank project

Here's the Snack: https://snack.expo.io/@ricvail/reanimated-error
Sometimes it seems that it works on the first try (or first couple of tries).
I tried on my Android phone (where expo was already installed, and it gave immediately the error), on my sister's android phone (freshly installed Expo, worked on the first try, I killed expo, reopened it, and it started crashing), and on my own phone again after clearing Expo's cache (again worked on first try).
On my iPad I have no such problem.

Also, most of the times the Expo app actually just crashes without giving any error. But when it does display the error, it's the one mentioned above.

Cannot run app on Ios

Summary

I am trying to run an app on my device through snack.expo.io.

But i get the following error: File 'file:/var/mobile/Containers/Data/Application/3C96BE0D-57E3-4328-80BC-41C0174C543D/Library/Caches/ExponentExperienceData/%252540git%25252Fgithub.com%25252Fdvijeniii05%25252Fcouples/snack-bundle-2-@react-navigation~stack@%5E5.5.1-ios.js -- file:///' isn't readable.

this is repository of my app: https://github.com/dvijeniii05/couples

Any ideas anyone? Would appreciate any help.

What platform(s) does this occur on?

iOS

SDK Version

v40

Reproducible demo or steps to reproduce from a blank project

Just trying to run the app on my device

Vague error message (Can't resolve '') when importing package with invalid entry point

Summary

Importing react-hooks-firebase causes snackager to return error:

curl "https://snackager.expo.io/bundle/react-firebase-hooks?version_snackager=true&platforms=ios,android,web"
Can't resolve '' in '/tmp/snackager/snackager/buildStatus/1/[email protected],android,web/package'

react-firebase-hooks does have a main entry in its package.json but that refers to a non existent file. The error message returned by Snackager is very vague

What platform(s) does this occur on?

Android, iOS, Web

SDK Version

40

Reproducible demo or steps to reproduce from a blank project

curl "https://snackager.expo.io/bundle/react-firebase-hooks?version_snackager=true&platforms=ios,android,web"

Editor incorrectly identifies comments in JSX

If you comment a line of JSX using // or a block using /* ... */ it renders as a comment (greyed out) in the editor, but it is not treated as a comment by the framework. Moreover, if you use a keyboard shortcut (ex: Command+/ on macOS) to comment out a selection or current line, the editor will insert // which again does not make a valid comment.

See screenshot where a line 16 appears commented out but isn't actually.

Expected: Apparently comments in JSX need to be delineated with {/* ... */} and anything else should not be rendered greyed out.

image

updating state inside useEffect freezes the whole website

Summary

Expected behaviour: Snack should recognize this pattern beforehand of updating state inside useEffect and prevent user doing that

Current behaviour: When we update state inside useEffect browser freezes

I want to work on this problem can I?

What platform(s) does this occur on?

Android

SDK Version

No response

Reproducible demo or steps to reproduce from a blank project

  1. Make a state in snack react native
  2. update that in useEffect hook
  3. You will see website freezing in few seconds/minutes

error when import snack project from github

when i try to use Import git repository in snack to edit my react native project this error is displayed : An error occurred during import. This could be because the data provided was invalid, or because the repository referenced is not a properly formatted Expo project.

my github link is : https://github.com/saeedjafary/SarvShop

I am seeing this error recently. there was no problem before

Module Namespacing Support for Packages

Summary

When installing a package that uses module namespacing (export * as {moduleName} from './{moduleName}), Expo's default configuration throws an error when compiling for web and iOS. This is an important tool for structuring TypeScript code, so I'd expect it to work out of the box.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

bare

What platform(s) does this occur on?

iOS, Web

SDK Version (managed workflow only)

4.5.2

Environment

MacOS, Node v14.15.5.

Reproducible demo or steps to reproduce from a blank project

https://snack.expo.io/kSlfJiSnR

Steps to reproduce:

  • npm install @dfinity/agent
  • Somewhere in the code - import { HttpAgent } from "@dfinity/agent";

Unable to resolve dependency in expo snack

Summary

From today I can not resolve several of my libraries that I used to create expo snacks. One example is when I want to use this library https://github.com/react-native-picker/picker, the expo website writes me: "Failed to resolve dependency '@react-native-picker/[email protected]' (Network request failed) RETRY".

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

iOS, Web

SDK Version (managed workflow only)

42

Environment

Unable to resolve module '@react-native-picker/picker.js'
Evaluating @react-native-picker/picker.js
Evaluating Select.js
Evaluating App.js
Loading App.js
Error: Unable to resolve module '@react-native-picker/picker.js'
at Object.eval (@react-native-picker/picker.js:1:1

at eval (@react-native-picker/picker.js

at eval (@react-native-picker/picker.js

at eval (<anonymous>)
at [snack internals]
at Object.a ([snack internals]
at e.evaluate ([snack internals]
at Ze ([snack internals]
at [snack internals]
at https://snack-web-player.s3.us-west-1.amazonaws.com/v2/42/static/js/app.056cc19a.chunk.js:1:14427

Reproducible demo or steps to reproduce from a blank project

The link of the snack: https://snack.expo.dev/@tozare/14d474

Save button overlaps with the "update available" notification

Summary

It looks like the save button is higher in the Z-hierarchy than the update available notification. (chrome on MacOS big sur)

Screenshot 2021-02-02 at 20 49 32

What platform(s) does this occur on?

Web

SDK Version

40

Reproducible demo or steps to reproduce from a blank project

When an update is available, resize your window so the notification should fall over the save button.

[Suggestion] Browse snacks

First and foremost, my apologies if this is not the appropriate place for such suggestion. It doesn't feel right but I cannot find where to.

To the topic. How about having a way to explore/browser/categorize snacks? Alla Codepen ¹ ².
I'm pretty sure many of us we'll have it useful to being able to search for updated and verified examples, etc.

"Use a free Appetize.io account" is missleading - since it's not free (anymore?)

Hi guys,

I just wanted to point out the message while you wait for your loading Android or iOS App in the expo snack.

It says this:

Device preview is at capacity
Queue position: 23
Don't want to wait?
Use a free Appetize.io account

But when I create an Appetize account it says that I have to pay.

So either it's not free anymore or I got something wrong?

Petition to rename the project

Seriously, why isn't it called Snackspo? Or Snaxpo? It keeps me up at night because I'm so full of anger. Think about it.

Snaxpo.io. It rhymes, it's short, cute. But no. Snack.expo.io somehow sounded better.

I'm sad now.

Stylesheet object not validating style property names

In an Expo snack, I found this behaviour of not throwing an error when a style property name is misspelled inside the StyleSheet.create() object.

For example:

const styles = StyleSheet.create({
    backgroundClor: 'tomato',
})

As per the expected behaviour in React Native and Expo apps, an error is thrown in this scenario. I am not sure if this behaviour is known or not (in terms of Expo Snack).

Here is an example in the snack: https://snack.expo.io/@amanhimself/cad717.

Asset.fromModule throws exception on web

Summary

Calling Asset.fromModule on Snack web throws the following exception:

resolveAssetSource.web.ts:18 Uncaught (in promise) ReferenceError: nativeExtensions is not defined
    at u (resolveAssetSource.web.ts:18)
    at resolveAssetSource.web.ts:28
    at p (resolveAssetSource.web.ts:84)
    at Function.value (Asset.ts:90)
    at _callee$ ((index):13)
    at l ((index):3)
    at Generator.eval [as _invoke] ((index):3)
    at Generator.eval [as next] ((index):3)
    at l ((index):3)
    at n ((index):3)

image

This causes all examples using Asset.fromModule to fail on Snack web. E.g. the ImageManipulator example and prevents creation of expo-print examples for Snack web.

What platform(s) does this occur on?

Web

SDK Version

42

Reproducible demo or steps to reproduce from a blank project

Example repo (taken from the https://docs.expo.dev/versions/latest/sdk/imagemanipulator/ example)
https://snack.expo.dev/@hein_expo/basic-imagemanipulator-usage

Steps to reproduce

  • Open above Snack
  • Open web preview in a separate popup
  • Open the Inspector

image

Cannot use gitpkg packages in snack

Summary

package.json (9:5)
Invalid dependency 'react-native-gifted-chat' (version 'https://github.com/myckhel/react-native-gifted-chat.git#react-native-gifted-chat-v0.16.7-gitpkg' is not a valid semver)
Retry

What platform(s) does this occur on?

Android, iOS, Web

SDK Version

41

Reproducible demo or steps to reproduce from a blank project

Add:
"react-native-gifted-chat": "https://github.com/myckhel/react-native-gifted-chat.git#react-native-gifted-chat-v0.16.7-gitpkg",
to package.json

Add support for changing the theme dynamically

As per request via @brentvatne from the react-native website team, updating to docsaurus 2

heya! some folks are working on rewriting the react native website on top of docusaurus 2 and part of that involves supporting light/dark mode. they're wanting a way to sync the theme on snack embeds with the site theme. i looked into this a bit and it seems like right now we only offer a way to set the theme once when initialized, via data-snack-theme.
i looked into using postMessage, eg: document.querySelector('iframe').contentWindow.postMessage(['expoDataEvent', { iframeId: '5kaybrx1d4', theme: 'dark' }], '*') - but it doesn't update the theme (maybe i'm doing this wrong? i extracted the iframe id from the target iframe src).
any suggestions on how they should proceed with this task of keeping snack embed theme in sync with the docusaurus theme?

Importing nested files causes dependency error

When importing a repository from github, I have two issues that have been troubling:

DevDependencies are not imported

When the package.json file is imported, it's clearing everything except for the dependencies entry. This causes problems when importing a project that uses dev dependencies. My particular case is usually for a project that includes tests and requires react-test-renderer as a devDependency. When imported the project complains that this dependency is missing. I don't want this to be installed as a regular dependency.

Importing nested files causes dependency error

When importing from somewhere other than the root of a package, snack complains that the dependency is missing and prompts to install a dependency that includes the nested folder structure. If you do this, snack works, but the project fails locally because that package does not exist in npm (405 error).

For example:
Add react-native-vector-icons/MaterialIcons to package.json?
Add @react-native-community/async-storage/jest/async-storage-mock to package.json?

Remove query params on save

Submodules can't be resolved

Summary

Submodules are not resolved by the Snack bundler. For example '@jsamr/counter-style/presets/thai' will raise the following error:

image

while it will work with metro or Webpack bundlers.

What platform(s) does this occur on?

Android, iOS, Web

SDK Version

Production (SDK 41)

Reproducible demo or steps to reproduce from a blank project

https://snack.expo.io/@jsamr/submodules-expo-bug

Also note that dependencies that in turn depend on the same submodules don't raise the above error.

Failed to resolve dependency ( (Network request failed)

Summary

Snack is not able to load/save the dependencies

What platform(s) does this occur on?

Web

SDK Version

37,38,39,40

Reproducible demo or steps to reproduce from a blank project

Snack editor is not loading /saving the any dependencies.

image
image

Deep linking / AuthSessions don't function - "Can't make a deep link into a standalone app with no custom scheme defined"

Summary

Expo Snack features that use deep linking like AuthSessions cause Snack to throw the following error when previewing on Android and iOS:
image

Can't make a deep link into a standalone app with no custom scheme defined

This issue also occurs when opening the example on a device through the Expo Go app's project section, but not when running the same code in a newly created expo app on a computer.

What platform(s) does this occur on?

Android, iOS

SDK Version

40

Reproducible demo or steps to reproduce from a blank project

https://snack.expo.io/@dylmye/reddit-auth-code - the result of clicking on the snack button from here

https://snack.expo.io/@dylmye/authsession-case-issue - one I made myself with a app.json with a schema defined

Failed to save Snack

Summary

image

app.bundle.js:109  INFO  Saving... Object
12:48:04.041 app.bundle.js:109  COMM  Requesting preview...
12:48:04.041 app.bundle.js:109  ERROR  TypeError: Cannot read property 'postMessage' of undefined
    at app.bundle.js:18
    at Set.forEach (<anonymous>)
    at b.getPreviewAsync (app.bundle.js:18)
    at b.saveAsync (app.bundle.js:18)
    at async yt._saveAsync (app.bundle.js:109)
12:48:04.051 app.bundle.js:18 Uncaught (in promise) TypeError: Cannot read property 'postMessage' of undefined
    at app.bundle.js:18
    at Set.forEach (<anonymous>)
    at b.getPreviewAsync (app.bundle.js:18)
    at b.saveAsync (app.bundle.js:18)
    at async yt._saveAsync (app.bundle.js:109)
12:48:40.949 app.bundle.js:109  INFO  Saving... Object
12:48:40.955 app.bundle.js:109  COMM  Requesting preview...
12:48:40.955 app.bundle.js:109  ERROR  TypeError: Cannot read property 'postMessage' of undefined
    at app.bundle.js:18
    at Set.forEach (<anonymous>)
    at b.getPreviewAsync (app.bundle.js:18)
    at b.saveAsync (app.bundle.js:18)
    at async yt._saveAsync (app.bundle.js:109)
12:48:40.965 app.bundle.js:18 Uncaught (in promise) TypeError: Cannot read property 'postMessage' of undefined
    at app.bundle.js:18
    at Set.forEach (<anonymous>)
    at b.getPreviewAsync (app.bundle.js:18)
    at b.saveAsync (app.bundle.js:18)
    at async yt._saveAsync (app.bundle.js:109)
12:49:00.434 app.bundle.js:109  INFO  Saving... Object
12:49:00.440 app.bundle.js:109  COMM  Requesting preview...
12:49:00.440 app.bundle.js:109  ERROR  TypeError: Cannot read property 'postMessage' of undefined
    at app.bundle.js:18
    at Set.forEach (<anonymous>)
    at b.getPreviewAsync (app.bundle.js:18)
    at b.saveAsync (app.bundle.js:18)
    at async yt._saveAsync (app.bundle.js:109)

What platform(s) does this occur on?

iOS

SDK Version

42

Reproducible demo or steps to reproduce from a blank project

Happed on this Snack:
https://snack.expo.dev/@hein_expo/shared-element-2?verbose=true

After the Expo Go client (iOS) disconnected, Save resumed working

image

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.