Skip to content
This repository was archived by the owner on May 21, 2022. It is now read-only.

Only show ActivityIndicator on vanilla Expo project (Expo 32.0.0) #33

Closed
lucky-c opened this issue Apr 12, 2019 · 5 comments
Closed

Only show ActivityIndicator on vanilla Expo project (Expo 32.0.0) #33

lucky-c opened this issue Apr 12, 2019 · 5 comments

Comments

@lucky-c
Copy link

lucky-c commented Apr 12, 2019

Hello,

Currently i want to try this library using latest version of vanilla Expo project using expo init, i have already follow the installation and usage instruction according to the project readme, but when i try to run the app on device, the app only show a small red ActivityIndicator that loop indefinitely (please see screenshot below). Please help for pointing any missing step or mistake that caused the text editor didn't shown properly.

Thank you for your help.

Screenshot
Screenshot_2019-04-12-20-05-15-458_host exp exponent

app.js

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import {WebViewQuillEditor, WebViewQuillViewer} from 'react-native-webview-quilljs';

export default class App extends React.Component {

  contentToDisplay = [
    { text: 'Hello' },
    { text: 'World', bold: true }
  ];

  onLoadCallback = () => {
    console.log("onLoadCallback");
  };

  getDeltaCallback = () => {
    console.log("getDeltaCallback");
  } 

  render() {
    return (
      <View style={styles.container}>
        <Text>HEADER</Text>
        <WebViewQuillEditor
          ref={component => (this.webViewQuillEditor = component)}
        />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#eee',
    marginTop:50,
    paddingTop:10
  },
});

package.json

{
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "eject": "expo eject"
  },
  "dependencies": {
    "expo": "^32.0.0",
    "react": "16.5.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
    "react-native-webview-quilljs": "^0.8.39"
  },
  "devDependencies": {
    "babel-preset-expo": "^5.0.0"
  },
  "private": true
}

app.json

{
  "expo": {
    "name": "coqa-quill",
    "slug": "coqa-quill",
    "privacy": "public",
    "sdkVersion": "32.0.0",
    "platforms": [
      "ios",
      "android"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    }
  }
}

expo log

...

INFO
20:04
Running application "main" with appParams: {"initialProps":{"exp":{"initialUri":"exp://192.168.1.19:19000","manifest":{"iconUrl":"http://192.168.1.19:19001/assets/./assets/icon.png","isVerified":true,"hostUri":"192.168.1.19:19000","version":"1.0.0","debuggerHost":"192.168.1.19:19001","icon":"./assets/icon.png","splash":{"resizeMode":"contain","backgroundColor":"#ffffff","image":"./assets/splash.png","imageUrl":"http://192.168.1.19:19001/assets/./assets/splash.png"},"logUrl":"http://192.168.1.19:19000/logs","privacy":"public","assetBundlePatterns":["**/*"],"primaryColor":"#023C69","orientation":"portrait","bundleUrl":"http://192.168.1.19:19001/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false&assetPlugin=C%3A%5CUsers%5CLenovo%5CDesktop%5Ccoba%5Ccoqa-quill%5Cnode_modules%5Cexpo%5Ctools%5ChashAssetFiles.js","updates":{"fallbackToCacheTimeout":0},"ios":{"supportsTablet":true},"packagerOpts":{"dev":true,"lanType":"ip","hostType":"lan","minify":false,"urlRandomness":"gy-yzw"},"env":{},"platforms":["ios","android"],"sdkVersion":"32.0.0","mainModuleName":"node_modules/expo/AppEntry","xde":true,"id":"@indohub/coqa-quill","loadedFromCache":false,"developer":{"tool":"expo-cli","projectRoot":"C:\\Users\\Lenovo\\Desktop\\coba\\coqa-quill"},"name":"coqa-quill","slug":"coqa-quill"},"shell":false}},"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
INFO
20:04
Asset {
  "downloadCallbacks": Array [],
  "downloaded": true,
  "downloading": false,
  "hash": "2e95b353f5022afbfff98aa91137bdda",
  "localUri": "file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540indohub%252Fcoqa-quill/ExponentAsset-2e95b353f5022afbfff98aa91137bdda.html",
  "name": "reactQuillEditor-index",
  "type": "html",
  "uri": "http://192.168.1.19:19001/assets/node_modules/react-native-webview-quilljs/assets/dist/reactQuillEditor-index.html?platform=android&hash=2e95b353f5022afbfff98aa91137bdda",
}
@reggie3
Copy link
Owner

reggie3 commented Apr 14, 2019

What kind of device are you using? If it is iOS, then it is probably related to an issue with the expo library referenced here: expo/expo-asset-utils#11

I'm trying to find out if there is a workaround before I revert to a previous version of this library.

@lucky-c
Copy link
Author

lucky-c commented Apr 15, 2019

I'm using Android 7.1.2 and 8.0.0 devices, and version 12.0.1 on iOS device. But the result is similar.

I got the log below for both platform, i think the html asset/file already loaded due to downloaded value already shown as true.

Asset {
  "downloadCallbacks": Array [],
  "downloaded": true,
  "downloading": false,
  "hash": "2e95b353f5022afbfff98aa91137bdda",
  "localUri": "file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540indohub%252Fcoqa-quill/ExponentAsset-2e95b353f5022afbfff98aa91137bdda.html",
  "name": "reactQuillEditor-index",
  "type": "html",
  "uri": "http://192.168.1.20:19001/assets/node_modules/react-native-webview-quilljs/assets/dist/reactQuillEditor-index.html?platform=android&hash=2e95b353f5022afbfff98aa91137bdda",
}

@lucky-c
Copy link
Author

lucky-c commented Apr 22, 2019

Hello, i just want to inform you that the issue above doesn't appeared anymore on Android devices using library version 0.8.40, the text editor successfully shown.
Just the iOS issue remains.

@Abdo-zayed
Copy link

Only show ActivityIndicator on vanilla Expo project , i have same issue , any solution ?

@reggie3
Copy link
Owner

reggie3 commented Jan 18, 2020

Fixed in version 2

@reggie3 reggie3 closed this as completed Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants