アムを割り当てますが、エミュレータで起動するとき、私はこのエラーを取得:が反応/ AFRAMEオブジェクトが反応し、ネイティブの内側AFRAMEをフックアップしようとすると、エラー
One of the sources for assign has an enumerable key on the prototype chain. Are you trying to assign a prototype property? We don't allow it, as this is an edge case that we do not support. This error is a performance optimization and no spec compliant.
私はAFRAME 0.5.0を使用して反応-ネイティブをしています0.41.2
エラーはpolyfills.jsの56行目からスローされ、aframe-master.js:55729のこのセクションに関連しています。
これには何らかの方法がありますか?別の割り当てを使用するには、フレームを修正する必要がありますか、これを回避する方法はありますか?
私は非常に単純なhello worldを実行しています。依存関係をロードしようとして失敗しています。他の関連する問題では、人々は、lodash.assignまたはObject.definePropertiesを使用して、それらの周りにいると言いました。これは、これを実行可能な解決策ですか?その間に私は以前のバージョンの反応ネイティブに戻すことができますが、私は理想的には最新のフレームを使用したいと思います。
https://github.com/facebook/react-native/issues/5507
https://github.com/facebook/react-native/issues/3634
** UPDATE **は [OK]を、私はロールバックしようとした、反応し、ネイティブ0.36.1インストールと私はAFRAME 0.3.2を使用するためにWebViewの中でロードてるサイトを切り替えます。
私が反応ネイティブアプリを持っているコードはこれです:
[OK]を私は、ロールバックしようとした反応ネイティブ0.36.1 rninitを使用してインストールし、私はAFRAME使用するWebViewの中でロードてるサイトを切り替えます0.3.2。
私が反応ネイティブアプリを持っているコードはこれです:
import React, { Component } from 'react';
// import ReactDOM from 'react-dom';
import {
AppRegistry,
WebView
} from 'react-native';
export default class test4 extends Component {
render() {
return (
<WebView source={{uri: 'http://[theurl]/test.html'}}/>
);
}
}
AppRegistry.registerComponent('test4',() => test4);
AFRAMEアプリはこれです:
<!DOCTYPE html>
<html>
<head>
<title>A-Frame walkthrough (final)</title>
<script src="/aframe.js"></script>
</head>
<body>
<a-scene>
<a-assets>
<img id="circle" src="circle.png"/>
</a-assets>
<a-sky src="Ephesus4_1.jpg" rotation="0 -130 0"></a-sky>
</a-scene>
</html>
とするとき、私はChromeからのWebViewを検査することにより、デバッガを開きます://#デバイスを検査し、私はこの出力を得る:
Mozilla/5.0 (Linux; Android 6.0; Android SDK built for x86_64 Build/MASTER; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36
aframe.js:54681 Recalculating device params.
aframe.js:54718 User agent: Mozilla/5.0 (Linux; Android 6.0; Android SDK built for x86_64 Build/MASTER; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36
aframe.js:54719 Pixel width: 2562
aframe.js:54720 Pixel height: 1442
aframe.js:54762 No DPDB device match.
aframe.js:54683 New device parameters:
aframe.js:54684 null
aframe.js:54692 Failed to recalculate device parameters.Dpdb.recalculateDeviceParams_ @ aframe.js:54692
aframe.js:54654 Fetching DPDB...
aframe.js:53106 Using fallback Android device measurements.
aframe.js:56388 Failed to load viewer profile: TypeError: Cannot read property 'getItem' of null
at Emitter.ViewerSelector (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:56386:36)
at VRDisplay.CardboardVRDisplay (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:52607:26)
at WebVRPolyfill.populateDevices (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:56694:17)
at WebVRPolyfill.getVRDisplays (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:56743:8)
at new THREE.VRControls (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:66848:13)
at Object.119.../lib/three (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:66227:16)
at s (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:1:620)
at http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:1:671
at Object.122../bind (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:66358:25)
at s (http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/aframe.js:1:620)ViewerSelector @ aframe.js:56388
aframe.js:53096 Uncaught TypeError: Cannot read property 'distortionCoefficients' of undefined
aframe.js:54662 Successfully loaded online DPDB.
aframe.js:54681 Recalculating device params.
aframe.js:54718 User agent: Mozilla/5.0 (Linux; Android 6.0; Android SDK built for x86_64 Build/MASTER; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/44.0.2403.119 Mobile Safari/537.36
aframe.js:54719 Pixel width: 2562
aframe.js:54720 Pixel height: 1442
aframe.js:54762 No DPDB device match.
aframe.js:54683 New device parameters:
aframe.js:54684 null
aframe.js:54692 Failed to recalculate device parameters.Dpdb.recalculateDeviceParams_ @ aframe.js:54692
http://ec2-52-62-186-186.ap-southeast-2.compute.amazonaws.com:8080/favicon.ico Failed to load resource: the server responded with a status of 404 (Not Found)
どれ勧告がいただければ幸いです!
私もAndroidのエミュレータ自体でこれを取得しています:
com.facebook.react.common.JavascriptException:{ "スタック": "エラー: 'WorkerGlobalScope' オン 'importScripts' を実行に失敗しました: 「http://localhost:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=falseのスクリプトがロードに失敗しました。\ nはexecuteApplicationScript(http://localhost:8081/ebuggerWorker.js:207)で\ n個のonMessage(http://localhost:8081/debuggerWorker.js:38.5) "}
で、私はWebViewの中にロードされている非AFRAMEサイトに切り替えても同じエラーを取得します。
こんにちはトビーを助けるためのクリス・チェンへ
おかげで、あなたはreactjsのバージョンを投稿し、使用しているAFRAMEだろうか? –
はいAframe 0.5.0とReact-native 0.41.2が質問に追加されました –
私の成功した展開では、フレーム0.3.2とReact-native 0.36.1が使用されました。テスト用にダウングレードすることをお勧めします。また、あなたの研究に基づいて、問題は反応ネイティブの終わりに関連しているようです。あなたはあなたのアプリでネイティブwebviewを読み込もうとしましたか? –