-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chart not rendering on Android Simulator using EXPO cli #51
Comments
Can you give me an example of what I hace to set on devPort? |
@oillada, |
On iOS works fine |
@oillada |
Have you tried the soltuon from the thread: #48 ? |
I couldn't figure out what exactly is the solution there. Its very unclear. |
same problem here also sir. |
Im debugging the problem and will update you when end of the process. |
+1 i am also stuck in this |
If i follow this section in FAQ it works in android (but i can't debug the application) Files are not loaded Use release mode instead of debug mode run react-native run-android --variant=release |
Thank you for your feedaback. I spent a few hours for debugging of the problem and in native expo there is problem with loading files (also in dev mode) at all. As a result we should use I tested also the solution with new module " Asset" form the thread #4 without success. ps. any hints will be really appreciated |
FYI , i am not using expo in my project. |
@achieverprince its does not matter if you use expo or not, you should place |
Planned on moving over from |
Ejecting is necessary, especially for android. |
Im experiencing the same issue, i was wondering what is the final solution for this problem? and can u provide a step by step implementation of the solution? |
i was able to import it properly and moved the folders to my /src/assets folder. |
+1 for android: Error loading page Domain :undefined Error Code:-1 Description:net::ERR_FILE_NOT_FOUND |
Like this, copy those 2 folders (highchart-files, highchart-layout) from node_modules highcharts directory, this fixed the error for me |
But i see in errors logs, what it not find Is are any ideas? |
Please add the below lines to build.gradle file in app folder after copying those two highcharts folders.
|
Also i create new expo project. I appeal to contributors @highcharts/highcharts-react-native. |
Have you tried to |
Yes. I added params useCDN and useSSL to teg chart, how you see in the top screen. But this not work. Also i lowered SDK version, but it not worked. |
+1 for this issue. I am using expo in my project, added params useCDN and useSSL but this not work in android only ios. I changed the devPath to my ip address the error dissapear but the chart is not render. Do you have any idea? |
To reproduce ERR_FILE_NOT_FOUND I follow steps outlined in highcharts blog post: What steps are required to make this blog post example work? Dependencies I worked from:
|
We are wokring on that and debugging the problem. Can be related with new versions of modules. Thankfully, we are able to reproduce the problem. I will inform you about progress, when find a reason of issue. |
On this line is using |
Modifying the property highchartsLayout = { uri: 'file:///android_asset/highcharts-layout/index.html' };
if(Platform.OS == 'ios'){
highchartsLayout = require('../highcharts-layout/index.html')
}
else if(props.devPath){
highchartsLayout = { uri: props.devPath + '/node_modules/@highcharts/highcharts-react-native/highcharts-layout/index.html' };
} That's the content of the <html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0" />
<link rel="stylesheet" type="text/css" href="css/styles.css">
<script>
const hcUtils = {
// convert string to JSON, including functions.
parseOptions: function (chartOptions) {
const parseFunction = this.parseFunction;
const options = JSON.parse(chartOptions, function (val, key) {
if (typeof key === 'string' && key.indexOf('function') > -1) {
return parseFunction(key);
} else {
return key;
}
});
return options;
},
// convert funtion string to function
parseFunction: function (fc) {
const fcArgs = fc.match(/\((.*?)\)/)[1],
fcbody = fc.split('{');
return new Function(fcArgs, '{' + fcbody.slice(1).join('{'));
}
};
// Communication between React app and webview. Receive chart options as string.
document.addEventListener('message', function (data) {
Highcharts.charts[0].update(
hcUtils.parseOptions(data.data),
true,
true,
true
);
});
window.addEventListener('message', function (data) {
Highcharts.charts[0].update(
hcUtils.parseOptions(data.data),
true,
true,
true
);
});
alert('a')
alert(Highcharts);
</script>
</head>
<body>
<div id="container"></div>
</body>
</html> |
We are still testing the beta-version, which fix all these kind of problems and should be released in the end of this week. |
We just finished testing the wrapper and released the beta version which is available here https://github.com/highcharts/highcharts-react-native/tree/beta-3 Any feedback will be really helpful. Please keep in mind, that all packages should be in the latest versions of them. Number of versions are declared also in the |
Any progress on getting this released? Or is there a simple way to test this beta? I'm trying to run code from the
|
The new 3.0 version is released. Im closing this ticket. If you will encounter any problems, please create a new ticket. In this case we will avoid confusing and keep the newest version on track. |
Hello, i got this issues using android simulator:
On ios device and simulator works fine.
Can you help me???
The text was updated successfully, but these errors were encountered: