Skip to content
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

win32_window.cc(57,14): error C3861: 'FlutterDesktopGetDpiForMonitor': identifier not found #672

Closed
esDotDev opened this issue Feb 14, 2020 · 8 comments

Comments

@esDotDev
Copy link

esDotDev commented Feb 14, 2020

Trying to build with the latest master versions, and getting this error on Windows 10:
win32_window.cc(57,14): error C3861: 'FlutterDesktopGetDpiForMonitor': identifier not found

Hardcoding the value above got me to a new error:
win32_window.cc(56,12): error C2220: the following warning is treated as an error win32_window.cc(56,12): warning C4189: 'monitor': local variable is initialized but not referenced

Removing the unused monitor variable allowed build to complete successfully.

@stuartmorgan
Copy link
Collaborator

Yes, we're aware of this issue; it's why the CI status is red at the moment. The Flutter engine roll that contained the change adding that API was reverted (for unrelated reasons), which broke a recent change landed here. I expect the Flutter engine will roll forward again shortly, but if that hasn't happened by tomorrow we'll temporarily revert the change here using that API. I'd like to hold off if possible because there have been other PRs since that touched surrounding code, so it's not a clean revert unfortunately.

In the very short term, you can either hack around it as above, or use Flutter at 97a5336a348eadb64c364c8e5063cb6efe0eb181 (just before the revert).

@esDotDev
Copy link
Author

Ok great, hacking around it is fine for us :) Just wanted to log in case it wasn't known.
Cheers,

@stuartmorgan
Copy link
Collaborator

The Flutter engine roller is running again, so this is fixed.

@toy-lin
Copy link

toy-lin commented Feb 19, 2020

Hi, @stuartmorgan. I'm facing the same problem.
How can i set Flutter at 97a5336a348eadb64c364c8e5063cb6efe0eb181 ?

Tks.

@stuartmorgan
Copy link
Collaborator

@toy-lin As noted above this was fixed 5 days ago; you should use the latest version of Flutter, not an old one. That suggestion was only a temporary workaround during the ~day where it was broken on head.

If you try to run the latest FDE against that hash now, you will have other issues, as other changes have landed requiring newer versions of Flutter.

@fer9917
Copy link

fer9917 commented Mar 2, 2020

I have updated flutter on the master channel with "flutter upgrade" and it sends an error when trying to run the application in windows.

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v1.15.4-pre.241, on Microsoft Windows [Version 10.0.18362.657], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[√] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.4.5)
[√] Android Studio (version 3.5)
[√] VS Code (version 1.42.1)
[√] Connected device (1 available)

• No issues found!

$ flutter run --verbose -d windows -v
[ +55 ms] executing: [C:\src\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +117 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +1 ms] 1d3fcfd6ca7e83c6c7d134fc99deb015839b0389
[ ] executing: [C:\src\flutter/] git describe --match v*.. --first-parent --long --tags
[ +95 ms] Exit code 0 from: git describe --match v*.. --first-parent --long --tags
[ ] v1.15.3-241-g1d3fcfd6c
[ +14 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[ +82 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[ ] origin/master
[ ] executing: [C:\src\flutter/] git ls-remote --get-url origin
[ +43 ms] Exit code 0 from: git ls-remote --get-url origin
[ ] https://github.com/flutter/flutter.git
[ +191 ms] executing: [C:\src\flutter/] git rev-parse --abbrev-ref HEAD
[ +119 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[ ] master
[ +132 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +8 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +44 ms] executing: C:\Users\fernando.delacruz\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
[ +57 ms] Exit code 0 from: C:\Users\fernando.delacruz\AppData\Local\Android\Sdk\platform-tools\adb.exe devices -l
[ ] List of devices attached
[ +23 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[ +10 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +503 ms] Launching lib\main.dart on Windows in debug mode...
[ +17 ms] C:\src\flutter\bin\cache\dart-sdk\bin\dart.exe C:\src\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter -Ddart.developer.causal_async_stacks=true --output-dill C:\Users\FERNAN~1.DEL\AppData\Local\Temp\flutter_tool.ceed929a-5c91-11ea-9f56-a4db30d23473\app.dill --packages C:\Users\fernando.delacruz\Downloads\PCH\flutter-desktop-embedding\example.packages -Ddart.vm.profile=false -Ddart.vm.product=false --bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoid-closure-call-instructions --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root
[ +53 ms] executing: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -utf8 -latest -version 16 -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.Windows10SDK.17763
[ +59 ms] Exit code 0 from: C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe -format json -utf8 -latest -version 16 -requires Microsoft.Component.MSBuild Microsoft.VisualStudio.Component.VC.Tools.x86.x64 Microsoft.VisualStudio.Component.Windows10SDK.17763
[ ] [
{
"instanceId": "fd954ded",
"installDate": "2020-02-21T17:50:40Z",
"installationName": "VisualStudio/16.4.5+29806.167",
"installationPath": "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise",
"installationVersion": "16.4.29806.167",
"productId": "Microsoft.VisualStudio.Product.Enterprise",
"productPath": "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\devenv.exe",
"state": 4294967295,
"isComplete": true,
"isLaunchable": true,
"isPrerelease": false,
"isRebootRequired": false,
"displayName": "Visual Studio Enterprise 2019",
"description": "Scalable, end-to-end solution for teams of any size",
"channelId": "VisualStudio.16.Release",
"channelUri": "https://aka.ms/vs/16/release/channel",
"enginePath": "C:\Program Files (x86)\Microsoft Visual Studio\Installer\resources\app\ServiceHub\Services\Microsoft.VisualStudio.Setup.Service",
"releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660893#16.4.5",
"thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660909",
"updateDate": "2020-02-21T17:50:40.3885407Z",
"catalog": {
"buildBranch": "d16.4",
"buildVersion": "16.4.29806.167",
"id": "VisualStudio/16.4.5+29806.167",
"localBuild": "build-lab",
"manifestName": "VisualStudio",
"manifestType": "installer",
"productDisplayVersion": "16.4.5",
"productLine": "Dev16",
"productLineVersion": "2019",
"productMilestone": "RTW",
"productMilestoneIsPreRelease": "False",
"productName": "Visual Studio",
"productPatchVersion": "5",
"productPreReleaseMilestoneSuffix": "1.0",
"productSemanticVersion": "16.4.5+29806.167",
"requiredEngineVersion": "2.4.1111.43337"
},
"properties": {
"campaignId": "",
"channelManifestId": "VisualStudio.16.Release/16.4.5+29806.167",
"nickname": "",
"setupEngineFilePath": "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installershell.exe"
}
}
]
[ +8 ms] Building Windows application...
[ +3 ms] executing: [C:\Users\fernando.delacruz\Downloads\PCH\flutter-desktop-embedding\example\windows/] C:\src\flutter\packages\flutter_tools\bin\vs_build.bat C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat Runner.sln Debug
[ +21 ms] <- compile package:example_flutter/main.dart
[ +715 ms] \Windows was unexpected at this time.
[ +28 ms] Building Windows application... (completed in 0.8s)
[+10024 ms] Exception: Build process failed. To view the stack trace, please run flutter run -d windows -v.
[ +3 ms] "flutter run" took 11,875ms.

#0 throwToolExit (package:flutter_tools/src/base/common.dart:14:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:568:7)

#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:711:18)
#3 _rootRunUnary (dart:async/zone.dart:1134:38)
#4 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#5 _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
#6 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#7 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#8 Future._completeWithValue (dart:async/future_impl.dart:526:5)
#9 _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:34:15)
#10 _completeOnAsyncReturn (dart:async-patch/async_patch.dart:293:13)
#11 RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#12 _rootRunUnary (dart:async/zone.dart:1134:38)
#13 _CustomZone.runUnary (dart:async/zone.dart:1031:19)
#14 _FutureListener.handleValue (dart:async/future_impl.dart:140:18)
#15 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#16 Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#17 Future._completeWithValue (dart:async/future_impl.dart:526:5)
#18 Future._asyncComplete. (dart:async/future_impl.dart:556:7)
#19 _rootRun (dart:async/zone.dart:1126:13)
#20 _CustomZone.run (dart:async/zone.dart:1023:19)
#21 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#22 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:965:23)
#23 _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#24 _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#25 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#26 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5).

I appreciate the help :)

@stuartmorgan
Copy link
Collaborator

@fer9917 I don't see anything in that log suggesting it's related to this issue; please file a new bug.

@fer9917
Copy link

fer9917 commented Mar 2, 2020

Thanks you

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants