Closed Lazialize closed 3 years ago
Hi @Lazialize,
I haven't test this extension on Linux. I guess there're some file path separator issues.
Could you please open vscode dev window by Ctrl+Shift+I
and share all logs in console?
well, is this ok?
security-warnings.ts:179 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
Policy set or a policy with "unsafe-eval" enabled. This exposes users of
this app to unnecessary security risks.
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
(anonymous) @ security-warnings.ts:179
workbench.desktop.main.js:sourcemap:3921 Extension 'ms-dotnettools.csharp cannot use PROPOSED API (must started out of dev or enabled via --enable-proposed-api)
updateEnableProposedApi @ workbench.desktop.main.js:sourcemap:3921
workbench.desktop.main.js:sourcemap:4512 Overwriting grammar scope name to file mapping for scope source.ruby.
Old grammar file: file:///usr/lib/code/extensions/ruby/syntaxes/ruby.tmLanguage.json.
New grammar file: file:///home/lazialize/.vscode-oss/extensions/wingrunr21.vscode-ruby-0.27.0/syntaxes/ruby.cson.json
register @ workbench.desktop.main.js:sourcemap:4512
workbench.desktop.main.js:sourcemap:259 [Extension Host] Error: Cannot find module './en-us.ts' at o (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:9:219702) at i (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:9:219651) at Object.<anonymous> (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:1201) at n (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:186) at Object.<anonymous> (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:9:72306) at n (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:186) at Object.<anonymous> (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:9:105171) at n (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:186) at Object.<anonymous> (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:9:184792) at n (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:186) at Object.<anonymous> (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:9:183620) at n (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:186) at Object.<anonymous> (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:9:178610) at n (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:186) at Object.<anonymous> (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:9:177806) at n (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:186) at /home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:985 at Object.<anonymous> (/home/lazialize/.vscode-oss/extensions/chaofan.hoi4modutilities-0.3.4/dist/extension.js:1:995) at Module.o._compile (/usr/lib/code/out/vs/loader.js:15:749) at Object.Module._extensions..js (internal/modules/cjs/loader.js:892:10) at Module.load (internal/modules/cjs/loader.js:735:32) at Module._load (internal/modules/cjs/loader.js:648:12) at Module._load (electron/js2c/asar.js:717:26) at Function.Module._load (electron/js2c/asar.js:717:26) at Function.t._load (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:955:769) at Function.n._load (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:925:106) at Function.i._load (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:921:391) at Module.require (internal/modules/cjs/loader.js:775:19) at require (internal/modules/cjs/helpers.js:68:18) at Function.s [as __$__nodeRequire] (/usr/lib/code/out/vs/loader.js:33:115) at h._loadCommonJSModule (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:926:266) at h._doActivateExtension (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:822:856) at h._activateExtension (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:821:937) at Object.actualActivateExtension (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:819:883) at e._activateExtension (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:598:859) at /usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:598:537 at Array.map (<anonymous>) at e._activateExtensions (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:598:525) at e.activateByEvent (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:596:14) at h._activateByEvent (/usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:820:618) at /usr/lib/code/out/vs/workbench/services/extensions/node/extensionHostProcess.js:829:401
t.log @ workbench.desktop.main.js:sourcemap:259
$logExtensionHostMessage @ workbench.desktop.main.js:sourcemap:4020
_doInvokeHandler @ workbench.desktop.main.js:sourcemap:4026
_invokeHandler @ workbench.desktop.main.js:sourcemap:4026
_receiveRequest @ workbench.desktop.main.js:sourcemap:4025
_receiveOneMessage @ workbench.desktop.main.js:sourcemap:4024
(anonymous) @ workbench.desktop.main.js:sourcemap:4022
fire @ workbench.desktop.main.js:sourcemap:95
fire @ workbench.desktop.main.js:sourcemap:424
_receiveMessage @ workbench.desktop.main.js:sourcemap:428
(anonymous) @ workbench.desktop.main.js:sourcemap:425
fire @ workbench.desktop.main.js:sourcemap:95
acceptChunk @ workbench.desktop.main.js:sourcemap:421
(anonymous) @ workbench.desktop.main.js:sourcemap:420
t @ workbench.desktop.main.js:sourcemap:431
emit @ events.js:203
addChunk @ _stream_readable.js:295
readableAddChunk @ _stream_readable.js:276
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
workbench.desktop.main.js:sourcemap:4898 [Embedded Page] %cElectron Security Warning (enableBlinkFeatures) font-weight: bold; This renderer process has additional "enableBlinkFeatures"
enabled. This exposes users of this app to some security risk. If you do not
need this feature, you should disable it.
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
workbench.desktop.main.js:sourcemap:4898 [Embedded Page] %cElectron Security Warning (Insecure Content-Security-Policy) font-weight: bold; This renderer process has either no Content Security
Policy set or a policy with "unsafe-eval" enabled. This exposes users of
this app to unnecessary security risks.
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
workbench.desktop.main.js:sourcemap:4898 [Embedded Page] Table not filled.
workbench.desktop.main.js:sourcemap:4898 [Embedded Page] Uncaught (in promise) RangeError: Maximum call stack size exceeded
Could you also share greece.txt so that I can check whether it works on Windows?
Did some experiment on Ubuntu. It works for vanilla national focuses.
I'm sorry for being late.
focus_tree = {
id = sre_greece_focus
country = {
base = 0
modifier = {
add = 10
tag = GRE
}
}
focus = {
id = SRE_GRE_establishment_of_a_military_dictatorship
icon = GFX_goal_generic_military_deal
x = 1
y = 1
cost = 10
available = {
has_country_flag = SRE_GRE_ioannis_metaxas_is_leader
}
completion_reward = {
set_politics = {
ruling_party = neutrality
elections_allowed = no
}
set_party_name = {
ideology = neutrality
name = GRE_neutrality_party
long_name = GRE_neutrality_party_long
}
add_political_power = 150
}
}
focus = {
id = SRE_GRE_dealing_with_political_unrest
icon = GFX_goal_generic_dangerous_deal
relative_position_id = SRE_GRE_establishment_of_a_military_dictatorship
x = 0
y = 1
cost = 8
completion_reward = {
if = {
limit = { has_idea = SRE_GRE_unstable_government }
remove_ideas = SRE_GRE_unstable_government
}
else_if = {
limit = { has_idea = SRE_GRE_unstable_government2 }
remove_ideas = SRE_GRE_unstable_government2
}
else_if = {
limit = { has_idea = SRE_GRE_unstable_government3 }
remove_ideas = SRE_GRE_unstable_government3
}
add_political_power = 150
}
}
focus = {
id = SRE_GRE_army_reform
icon = GFX_focus_chi_army_reform
x = 8
y = 0
cost = 10
completion_reward = {
army_experience = 10
}
}
focus = {
id = SRE_GRE_infantry_equipment_updates
icon = GFX_goal_generic_small_arms
relative_position_id = SRE_GRE_army_reform
x = -1
y = 2
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_army_reform
}
completion_reward = {
}
}
focus = {
id = SRE_GRE_doctrine_effort
icon = GFX_goal_generic_army_doctrines
relative_position_id = SRE_GRE_army_reform
x = 0
y = 1
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_army_reform
}
completion_reward = {
}
}
focus = {
id = SRE_GRE_doctrine_effort2
icon = GFX_goal_generic_army_doctrines
relative_position_id = SRE_GRE_doctrine_effort
x = 0
y = 2
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_doctrine_effort
}
completion_reward = {
}
}
focus = {
id = SRE_GRE_doctrine_effort3
icon = GFX_goal_generic_army_doctrines
relative_position_id = SRE_GRE_doctrine_effort2
x = 0
y = 1
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_doctrine_effort2
}
completion_reward = {
}
}
focus = {
id = SRE_GRE_artillery_modernization
icon = GFX_goal_generic_army_artillery2
relative_position_id = SRE_GRE_infantry_equipment_updates
x = 0
y = 3
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_infantry_equipment_updates
}
completion_reward = {
}
}
focus = {
id = SRE_GRE_infantry_transport
icon = GFX_goal_generic_army_motorized
relative_position_id = SRE_GRE_army_reform
x = 1
y = 2
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_army_reform
}
completion_reward = {
}
}
focus = {
id = SRE_GRE_tank_effort
icon = GFX_goal_generic_army_tanks
relative_position_id = SRE_GRE_infantry_transport
x = 0
y = 3
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_infantry_transport
}
completion_reward = {
}
}
focus = {
id = SRE_GRE_mechanization
icon = GFX_goal_generic_build_tank
relative_position_id = SRE_GRE_infantry_transport
x = 1
y = 1
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_infantry_transport
}
completion_reward = { }
}
focus = {
id = SRE_GRE_infantry_equipment_reinforcement
icon = GFX_goal_generic_small_arms
relative_position_id = SRE_GRE_infantry_equipment_updates
x = -1
y = 1
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_infantry_equipment_updates
}
completion_reward = { }
}
focus = {
id = SRE_GRE_special_forces_effort
icon = GFX_goal_generic_special_forces
relative_position_id = SRE_GRE_doctrine_effort3
x = 0
y = 2
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_doctrine_effort3
}
prerequisite = {
focus = SRE_GRE_tank_effort
}
prerequisite = {
focus = SRE_GRE_artillery_modernization
}
completion_reward = {
}
}
focus = {
id = SRE_GRE_support_companies_reinforcement
icon = GFX_goal_support_companies
relative_position_id = SRE_GRE_infantry_equipment_reinforcement
x = 0
y = 1
cost = 10
search_filters = { FOCUS_FILTER_RESEARCH }
prerequisite = {
focus = SRE_GRE_infantry_equipment_reinforcement
}
completion_reward = {
}
}
}
This also works on my machine:
Could you share another log? That is, after preview tab HOI4: greece.txt
opened, run command Developer: Open Webview Developer Tools
from command palette (Ctrl+Shift+P
), and you can find logs in console window.
oh, Im sorry. I was sending the wrong one. This is the right one.
focus_tree = {
id = sre_greece_focus
country = {
base = 0
modifier = {
add = 10
tag = GRE
}
}
focus = {
id = SRE_GRE_establishment_of_a_military_dictatorship
icon = GFX_goal_generic_military_deal
x = 1
y = 1
cost = 10
available = {
has_country_flag = SRE_GRE_ioannis_metaxas_is_leader
}
completion_reward = {
set_politics = {
ruling_party = neutrality
elections_allowed = no
}
set_party_name = {
ideology = neutrality
name = GRE_neutrality_party
long_name = GRE_neutrality_party_long
}
add_political_power = 150
}
}
focus = {
id = SRE_GRE_dealing_with_political_unrest
icon = GFX_goal_generic_dangerous_deal
relative_position_id = SRE_GRE_establishment_of_a_military_dictatorship
x = 0
y = 1
cost = 8
completion_reward = {
if = {
limit = { has_idea = SRE_GRE_unstable_government }
remove_ideas = SRE_GRE_unstable_government
}
else_if = {
limit = { has_idea = SRE_GRE_unstable_government2 }
remove_ideas = SRE_GRE_unstable_government2
}
else_if = {
limit = { has_idea = SRE_GRE_unstable_government3 }
remove_ideas = SRE_GRE_unstable_government3
}
add_political_power = 150
}
}
focus = {
id = SRE_GRE_army_effort
x = 10
y = 0
cost = 10
completion_reward = {
}
}
focus = {
id = SRE_GRE_infantry_equipment_updates
relative_position_id = SRE_GRE_army_effort
x = -2
y = 1
cost = 10
completion_reward = {
}
}
focus = {
id = SRE_GRE_doctrine_effort
relative_position_id = SRE_GRE_army_effort
x = 0
y = 1
completion_reward = {
}
}
focus = {
id = SRE_GRE_doctrine_effort2
relative_position_id = SRE_GRE_doctrine_effort
x = 0
y = 1
completion_reward = {
}
}
focus = {
id = SRE_GRE_doctrine_effort3
relative_position_id = SRE_GRE_doctrine_effort2
x = 0
y = 1
completion_reward = {
}
}
focus = {
id = SRE_GRE_army_effort
relative_position_id = SRE_GRE_army_effort
x = 2
y = 1
completion_reward = {
}
}
}
And the requested log is below.
VM61 renderer_init.js:2903 Electron Security Warning (enableBlinkFeatures) This renderer process has additional "enableBlinkFeatures"
enabled. This exposes users of this app to some security risk. If you do not
need this feature, you should disable it.
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
warnAboutEnableBlinkFeatures @ VM61 renderer_init.js:2903
VM61 renderer_init.js:2859 Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security
Policy set or a policy with "unsafe-eval" enabled. This exposes users of
this app to unnecessary security risks.
For more information and help, consult
https://electronjs.org/docs/tutorial/security.
This warning will not show up
once the app is packaged.
(anonymous) @ VM61 renderer_init.js:2859
focustree.js:8 Table not filled.
(anonymous) @ focustree.js:8
focustree.js:1 Uncaught (in promise) RangeError: Maximum call stack size exceeded
at t (focustree.js:1)
at t (focustree.js:22)
at t (focustree.js:22)
at t (focustree.js:22)
at t (focustree.js:22)
at t (focustree.js:22)
at t (focustree.js:22)
at t (focustree.js:22)
at t (focustree.js:22)
at t (focustree.js:22)
The root cause of the issue is that relative_position_id
of this focus is itself, so the preview page can't find the correct position of the focus. Removing relative_position_id
or point it to other focus will fix the issue.
focus = {
id = SRE_GRE_army_effort
relative_position_id = SRE_GRE_army_effort
x = 2
y = 1
completion_reward = {
}
}
I'll do a change to show all errors clearly instead of just showing nothing.
ah, I see. I did not notice. Thank you.
Summary
Preview HOI4 File does not working on linux
Detailed Description
When I pushed preview hoi4 file button or entered the command, open preview tab to side but does not display anything.
In the focus tree preview, only continuous focuses frame is displayed.![Screenshot from 2020-07-10 09-42-52](https://user-images.githubusercontent.com/3455147/87104059-c20e8780-c291-11ea-9a5f-5bef26561098.png)
Context (Environment)
OS: Manjaro Linux; Build ID: rolling 64bit VS Code: 1.45.1 HOI4 Mod Utilities: 0.3.4
My configuration
Global Settings
Directory Settings
Others
Thank you for read my poor English. If you need more information, please ask.