Fork me on GitHub
#shadow-cljs
<
2018-04-15
>
tianshu02:04:57

@thheller just tried the new :expo target, following the example project.

tianshu02:04:47

And I can just dismiss this error, the UI loaded successfully.

tianshu02:04:40

It's likely my exp is not the lastest.

tianshu02:04:56

still met the same error with the lastest exp. @thheller can you provide your versions of exp and create-react-native-app?

thheller07:04:00

@doglooksgood that is with the same code? or did you add something? maybe its your Expo app version?

thheller07:04:26

"dependencies": {
    "expo": "^26.0.0",
    "react": "16.3.0-alpha.1",
    "react-native": "0.54.0"
  }

thheller07:04:44

thats what I got yesterday when running create-react-native-app

tianshu07:04:48

It's the same code, I haven't modify anything.

thheller07:04:57

should be easier to figure out the problem once I add source mapping

tianshu07:04:55

{
  "name": "DemoApp",
  "version": "0.1.0",
  "private": true,
  "devDependencies": {
    "react-native-scripts": "1.13.1",
    "jest-expo": "26.0.0",
    "react-test-renderer": "16.3.0-alpha.1"
  },
  "main": "./node_modules/react-native-scripts/build/bin/crna-entry.js",
  "scripts": {
    "start": "react-native-scripts start",
    "eject": "react-native-scripts eject",
    "android": "react-native-scripts android",
    "ios": "react-native-scripts ios",
    "test": "jest"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "expo": "^26.0.0",
    "react": "16.3.0-alpha.1",
    "react-native": "0.54.0"
  }
}
I think we have the same dependencies.

thheller07:04:15

yep thats identical to mine

thheller07:04:10

which expo app version do you have? mine is 2.4.7.1013849

tianshu07:04:16

2.4.6.1013746

tianshu07:04:51

This may be the reason

tianshu07:04:36

If installed from AppStore, the version will be 2.4.7, if let exp download and install on ios simulator, the version will be 2.4.6

tianshu07:04:55

I'll try if it works on 2.4.7

thheller08:04:55

you can look at the DemoApp/out-ios/bundle.ios.js file and look at the lines directly until source maps work

thheller08:04:07

maybe that will give a clue which part of the code actually doesn't work

thheller08:04:37

didn't try running anything in a simulator yet at all

tianshu08:04:00

It's a pretty large function, it failed at

16258           case 'blob':
 16259             if (typeof this._response === 'object' && this._response) {
 16260               this._cachedResponse = BlobManager.createFromOptions(this._response);
 16261             } else {
 16262               throw new Error("Invalid response for blob: " + this._response);    <--- Here
 16263             }
 16264
 16265             break;
can you find this part in your bundle.ios.js?

tianshu08:04:20

this error occurs after the app is launched, hot-reload and repl already work.

thheller08:04:40

seems to be the XHR wrapper they provide

thheller08:04:57

are you doing anything to trigger the error?

tianshu08:04:30

no, error occur after app is started

thheller08:04:25

how do you know that the rest works then?

tianshu08:04:26

I can just press Dismiss

thheller08:04:17

and changing the code will display the actual changes after dimissing the error?

tianshu08:04:49

yes, it works

thheller08:04:05

weird. reloading code is the only xhr request it should be doing

tianshu08:04:28

maybe it's for some expo specific features?

tianshu08:04:29

on my expo app on ios, I can't find the + button. It was there

tianshu08:04:56

but after upgrade the newer version, it disappear

thheller08:04:13

ah you mean the scan qrcode thing? can just use the default iOS Camera app for that.

thheller08:04:45

yeah looks like that for me too. just use the Camera app

thheller08:04:17

on android I did get a scan qrcode option in the app itself. dunno why its not there on ios

tianshu08:04:13

okay, I'll have try now

tianshu08:04:47

Ok, it works with 2.4.7 expo!

thheller08:04:19

cool. 2.4.6 was running the simulator? how did you start the simulator?

tianshu08:04:11

once you use command exp to start a ios simulator, it will download expo and install it automatically.

tianshu08:04:07

my error is about version incompatible, thank you very much and great job!

thheller08:04:44

ah good to know.

thheller08:04:13

10:36:35 [exp] Installing Expo on device
\10:36:38 [exp] Couldn't start project on Android: Error running adb: Failed to install C:\Users\thheller\.expo\android-apk-cache\Exponent-2.4.0.apk:

thheller08:04:29

when running exp android. I'm on windows so no iOS.

thheller08:04:39

emulator is running though. no idea what is wrong

thheller08:04:55

hmm I guess it can't find adb

thheller08:04:11

hmm how do I get the url to the emulator though?

tianshu08:04:49

You mean exp://...?

thheller08:04:09

yeah. emulator doesn't have a camera option

tianshu08:04:53

on ios expo will use the url in clipboard.

tianshu08:04:00

I haven't try android yet.

thheller08:04:35

ah hehe that worked. thanks.

tianshu08:04:56

what's version of expo on android emulator?

thheller08:04:17

hmm it seems to run fine in this emulator

thheller08:04:31

that was easier than expected 😉

tianshu08:04:28

never mind any error with versions, that not worth the time.😂

thheller08:04:33

I can probably fake the version easily. the client sends a "exponent-sdk-version" "26.0.0,25.0.0,24.0.0,23.0.0,22.0.0,21.0.0,20.0.0" header on connect. can just pretend to by any of those 😉

thheller08:04:58

done. no idea if that fixes anything but shouldn't hurt.

thheller09:04:31

the android version sends "26.0.0,25.0.0,24.0.0,23.0.0,22.0.0,21.0.0,20.0.0" as versions

thheller09:04:44

the ios version sends "20.0.0,21.0.0,22.0.0,23.0.0,24.0.0,25.0.0,26.0.0"

thheller09:04:12

win for constistency I guess 😛

tony.kay23:04:21

on 2.2.31 I’m no longer getting hot reload or a HUD. Anyone else seeing that?

tony.kay23:04:15

@thheller I have no problems in 2.2.29 (well, HUD is a little erratic, but it’s always been in sort of a hard to describe way), but in 31 I get a console error about devtools, and hot load doesn’t work.

tony.kay23:04:29

shadow.module.test.append.js:2 Uncaught TypeError: Cannot read property 'devtools' of undefined
    at shadow.module.test.append.js:2
(anonymous) @ shadow.module.test.append.js:2

tony.kay23:04:02

I was trying to upgrade my template…based on lein new fulcro app shadow-cljs demo, running the test build.