Unreal Engine 5 Plugin: Missing import: UnrealEditor-SteamVR.dll - dll

I have a plugin that fails to load initially when starting up my project and gives this error: The game module ‘PluginName’ could not be loaded. There may be an operating system error or the module may not be properly set up
When reviewing the log file I see that the issue is caused by:
Missing import: UnrealEditor-SteamVR.dll
If I copy this DLL from the Unreal Engine 5 plugins into my Plugin's Binary folder, the project will open as normal and load the plugin. However, this was not the case for Unreal Engine 4, so I'm trying to see why I need to copy this DLL now.
In my plugin Build CS file I have a reference to SteamVR. Maybe this needs to be updated?
PublicDependencyModuleNames.AddRange(
new string[]
{
"Core",
// ... add other public dependencies that you statically link with here ...
"CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "OpenVR"
}
);
PrivateDependencyModuleNames.AddRange(new string[] { "SteamVR" });
How to get this to work without manually adding in the DLL?

I edited my .uplugin file and added the SteamVR plugin dependency, which resolved the issue.
"Plugins": [
{
"Name": "SteamVR",
"Enabled": true
}
]
Edit 1:
I discovered that though multiple Steam libs were included in my C++ it was a function from the SteamVRFunctionLibrary responsible for causing the issue on startup when the SteamVR plugin isn't enabled.

Related

Npm workspaces: Different "main" property for development and publishing?

I've created an npm workspace with two packages "foo" and "bar".
Furthermore, I'm using typescript so both packages contain a src/index.ts.
During development, I want to have the "main" property of both packages to be src/index.ts.
But after building and publishing the packages the "main" entry has to point to the built dist/index.js.
How can I accomplish that or is my assumption wrong, that I can point to the typescript file during development?
But then I would have to rebuild the packages during development all the time.
I hope that's not necessary.
Thank you for your help in advance
UPDATE
To be more precise, I need to have "main" point to the Typescript file src/index.ts because otherwise, I can't reference "foo" inside of "foo" itself:
// foo/src/index.ts
import { something } from 'foo';
This error is thrown:
[vite:resolve] Failed to resolve entry for package "foo". The package may have incorrect main/module/exports specified in its package.json.
The above import only works, If "main" points to src/index.ts.
Otherwise I would have to use relative paths to the imported file of the same project, for example
// foo/src/index.ts
import { something } from './someotherfile.ts';
I found out, that vite needs the plugin vite-tsconfig-paths to find my main tsconfig.json to properly resolve the project:
// vite.config.ts
import tsconfigPaths from "vite-tsconfig-paths";
plugins: [
tsconfigPaths({
root: "../../",
}),
],

Instant app with multivariant base module

I've started to implement instant app feature in my application. I managed to transition to base module and properly build an installable app. The base module has 3 build types:
buildTypes {
release {...}
acceptance {...}
debug {...}
When I try to build instant app as a separate module that has build.gradle file:
apply plugin: 'com.android.instantapp'
dependencies {
implementation project(':base')
}
I'm getting below error message:
Cannot choose between the following variants of project :app:
- inchargeAcceptanceBundleElements
- inchargeAcceptanceRuntime
- inchargeAcceptanceUnitTestCompile
...
(much much longer I can give full stacktrace if needed)
I tried to change instantapp/build.gradle:
implementation project(path: ':base', configuration: 'default')
but then I get:
Unable to resolve dependency for ':instantapp#debug/compileClasspath': Failed to transform file 'base-release.aar' to match attributes {artifactType=processed-aar} using transform IdentityTransform
Then the app module itself has 4 product flavors but it shouldn't matter I believe.
Any advice how to run instantapp module ?

No executable found matching command dotnet-projectmodel-server, VS2015

I am trying to build a new front end application with dotnet core but getting an error as below while to open the project.
i followed that answer but not working for me.
getting this error while trying to restore :
error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
running dotnet restore command gives below error :
error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.1\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
I got the same problem yesterday.
Unfortunately, I don't know exactly what I was doing wrong, but I managed to solve my error.
I used the strategy on this page here
I added a global.json file in my Solution Items and I specified all the .xproj projects of my solution.
{
"projects": [ "src", "test" ],
"sdk": {
"version": "1.0.0-preview2-003121"
}
Hope it helps.
Running dotnet-restore solved this issue for me. This was after i had updated the global.js to tarket the specific SDK version.
https://learn.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-restore

IntelliJ run vs running a jar, with a Springboot Kotlin, Multi module Gradle project with Social Oauth2

TL;DR: Why does everything run fine when started via IntelliJ, and why is it broken when call java -jar app.jar. And how do I fix this?
Alright, I have some issues with a backend I am trying to dockerize. I have an application created with Spring Boot (1.4.2.RELEASE) following the Spring Oauth (2.0.12.RELEASE) guide on their page. I follow the Gradle version, since I prefer Gradle over Maven. Also I am using Kotlin instead of Java. Everything is fine, I start via IntelliJ my backend with static front end, I can login via Facebook (and Google and Github), I receive a nice Principal witch holds al the information I need, and I can modify Spring Security to authorize and permit endpoints. So far so good.
Now for the bad part, when I run either ./gradlew clean build app:bootrun or ./gradlew clean build app:jar and run the jar via java -jar (like I will do in my Docker container), my backend comes up. My static front end pops up. Now I want to login via Facebook, I end up on the Facebook login page, I enter my credentials, and... nothing!
I end up back on my homepage, not logged in, no log messages that mean anything to me, just silence. The last thing I see in the log is:Getting user info from: https://graph.facebook.com/me
This Url will give me in my browser:
{
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500,
"fbtrace_id": "GV/58H5f4fJ"
}
}
When going to this URL via an IntelliJ start, it will give me credential details. Obviously something is going wrong, but I have no clue what. Especially since a run from IntelliJ works fine. There is some difference between how the jar is started, and how IntelliJ's run config works, but I have no clue where to search for what. I could post trace logging, or all my Gradle files, but perhaps thats too much info to put in 1 question. I will defenitly update this question if someone needs some more details :)
The structure outline of this project is as follows:
root:
- api: is going to be opensourced later, contains rest definitions and DTOs.
- core: contains the meat. Also here is included in the gradle file
spring-boot-starter, -web, -security, spring-security-oauth2, and some jackson stuff.
- rest: contains versioned rest service implementations.
- app: contains angular webjars amongst others, the front end, and
my `#SpringBootApplication`, `#EnableOAuth2Client`
and the impl of `WebSecurityConfigurerAdapter`.
Why does everything run fine when started via IntelliJ, and why is it broken using bootRun or the jar artefact. And how do I fix this?
I found it, the problem was not Multi module Graldle, Spring boot, or Oauth2 related. In fact it was due to a src set config of Gradle, where Java was supposed to be in a Java src set folder, and Kotlin in a Java src set folder:
sourceSets {
main.java.srcDirs += 'src/main/java'
main.kotlin.srcDirs += 'src/main/kotlin'
}
As Will Humphreys stated in his comment above, IntelliJ takes all source sets, and runs the app. However, when building the jar via Gradle, these source sets are stricter. I had a Java file in my Kotlin src set, which is no problem for IntelliJ. But the jar created by Gradle takes into account the source sets as defined in the build.gralde file, which are stricter.
I found my missing bean issue with the code below:
#Bean
public CommandLineRunner commandLineRunner(ApplicationContext ctx) {
return args -> {
System.out.println("Let's inspect the beans provided by Spring Boot:");
String[] beanNames = ctx.getBeanDefinitionNames();
Arrays.sort(beanNames);
for (String beanName : beanNames) {
System.out.println(beanName);
}
};
}
The Bean I missed was called AuthenticationController, which is a #RestController, and kinda crucial for my authentication code.

Load debug version of pre-built module via npm/webpack

There is a javascript library, pre-built and available on npm, that I wish to develop with/debug. In my case, it is openlayers.
In the classic way of requiring a javascript file and wanting to debug, one would just switch the script url from the production version to the debug version, ie:
to
However, when using webpack and then importing via npm:
import openlayers from 'openlayers'
Gets you the production distribution of the library, the same as the ol.js script from above.
On a side note, to stop webpack trying to parse a prebuilt library and throw a warning about that you must include something like this:
// Squash OL whinging
webpackConfig.module.noParse = [
/\/dist\/ol.*\.js/, // openlayers is pre-built
]
Back to the problem at hand: how can I conditionally load a different entry-point for a module prebuilt and imported like this?
Of course, I can do it in a hacky way. By going into the node_modules/openlayers/package.json and switching the browser field from
"browser": "dist/ol.js",
to
"browser": "dist/ol-debug.js",
Is there a way I can request a different entry point via webpack or by using a different import syntax? Do I first have to petition the library maintainers to update the browser field to allow different entry point hints to browsers, according to the spec? https://github.com/defunctzombie/package-browser-field-spec
Thoughts on a more effective way to make this happen? Yearning to be able to programmatically switch loading of the production and debug versions of a library based on env variables.
Webpack has configuration options for replacing a module into a different path: https://webpack.github.io/docs/configuration.html#resolve-alias
This resolves the openlayers import to use the debug version:
webpackConfig.resolve.alias: {
openlayers: 'openlayers/dist/ol-debug.js'
}
In my build system I have a function that takes the environment type and returns the matching webpackConfig. Based on the parameter I include the above snippet or not.
Full code: webpack-multi-config.js
I have two different (gulp-) tasks for development and production. For example the production task: webpackProduction.js
Line 1 imports the config script with production as type.
My build system is based on gulp starter.