Hi, all was fine in 1.2.164 version, in last 1.2.166. something going weird in html5, I see that issue:
Facebook initialize failed ReferenceError: FB is not defined
I use custom engine_template.html
, but I also tried to do via default (/builtins/manifests/web/engine_template.html) - same error.
My custom engine_template
and of course in game.project I have Facebook appId.
Does anyone have same issue? Any help will be appreciated!
britzl
March 27, 2020, 7:26pm
2
Can you check that the generated index.html contains the following lines:
1 Like
Thanks a lot @britzl I missed that somewhere…
britzl
March 28, 2020, 6:32am
4
What do you mean? It should automatically be included in your final index.html by the build system. Did your remove it but hand after the build?
1 Like
I mean I missed that need to add this code now since 1.2.165 or 1.2.166, because in 1.2.164 all works fine.
about automatically including, if select the following default engine_template.index
:
there is same error in 1.2.166 version also.
britzl
March 28, 2020, 6:58pm
6
I see. @JCash we should be merging these right?
1 Like
Yes, and the merged result should be found in your build folder.
Could you share it please?
do you mean the final engine_template.index
?
The final engine_template.html
, yes.
added (just added lines that @britzl mentioned).
but to be honest to it’s not ideal solution, because now, the loading of engine depends on availability file: //connect.facebook.net/en_US/sdk.js
gistfile1.txt
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, minimal-ui, shrink-to-fit=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>{{project.title}} {{project.version}}</title>
This file has been truncated. show original
britzl
March 30, 2020, 7:36am
11
True. This could be changed, but you must then check availability of Facebook in your code before using it.
2 Likes
created simple example, just empty project with fb-extension:
test facebook extension defold
with standart template (/builtins/manifests/web/engine_template.html
)
result of 1.2.164:
result of 1.2.166:
2 Likes
britzl
March 30, 2020, 10:02am
13
Yep, we know. I’m investigating it. We changed how we are merging manifests. It used to happen in bob, but now it happens on the build server. And apparently something goes wrong when it happens on the server.
1 Like
britzl
March 31, 2020, 4:53am
14
This has been resolved now in the latest version.
1 Like
just checked, works fine in 1.2.167!
2 Likes