I am simply building Chromium windows. It builds perfectly and works in every configuration I try. When I modify the source code, to include, in select_file_picker_win.cpp
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window.h"
#include "content/public/browser/navigation_controller.h"
doesn't work.
The problem is that it can't link to the object generated.
Unresolved symbol browser.create
I tried different linkers, different compilers, different gn gen configurations, and same.
Where do I need to tell gn or ninja about this, to add this object when linking this file?
Something changes when i modify the ninja file inside the out folder, related to selectfile.. the error becomes a cyclic redundancy problem, and the file gets overwritten anyway so i know it is not the right solution.
lld-link: ←[0;31merror: ←[0mundefined symbol: public: __cdecl
Browser::CreateParams::CreateParams(enum Browser::Type, class Profile
*, bool)
Edit:
I modified BUILD.gn to add this:
deps = [
"//base",
"//base:i18n",
"//build:chromeos_buildflags",
"//skia",
"//ui/base",
"//ui/strings",
"//url",
"//chrome/browser",
]
allow_circular_includes_from = [
"//chrome/browser",
]
but the BUILD.gn from chrome/browser includes the previous, so I expected a cyclic redundancy. I have it:
ERROR Dependency cycle: //content:content ->
//content/gpu:gpu_sources -> //content/child:child ->
//content/common:common -> //ui/shell_dialogs:shell_dialogs ->
//chrome/browser:browser -> //apps:apps ->
//components/keyed_service/content:content ->
//content/public/browser:browser -> //content:content
FAILED: build.ninja
so I added this:
allow_circular_includes_from = [
"//chrome/browser/devtools",
"//chrome/browser/profiling_host",
"//chrome/browser/ui",
"//chrome/browser/ui/webui/bluetooth_internals",
"//chrome/browser/storage_access_api:permissions",
"//chrome/browser/safe_browsing",
"//chrome/browser/safe_browsing:verdict_cache_manager_factory",
"//chrome/browser/safe_browsing:advanced_protection",
"//chrome/browser/safe_browsing:metrics_collector",
"//ui/shell_dialogs",
[0/1] Regenerating ninja files
ERROR Dependency cycle:
//content:content ->
//content/gpu:gpu_sources ->
//content/child:child ->
//content/common:common ->
//ui/shell_dialogs:shell_dialogs ->
//chrome/browser:browser ->
//apps:apps ->
//components/keyed_service/content:content ->
//content/public/browser:browser ->
//content:content
FAILED: build.ninja
../../buildtools/win/gn.exe --root=../.. -q --ide=vs --regeneration gen .
ninja: error: rebuilding 'build.ninja': subcommand failed
Edit:
https://github.com/skopf/minimal-gn-project
this does not work, complains about gn.exe missing, but gn is both in the path and current dir,
When component build = false,
//content/browser:browser -> //content/common:common ->
//ui/shell_dialogs:shell_dialogs -> //chrome/browser:browser ->
//apps:apps -> //components/keyed_service/content:content ->
//content/public/browser:browser ->
//content/public/browser:browser_sources ->
//content/browser:browser
the dependencies are different, same error.
I tried adding
allow_circular_includes_from = [
"//ui/shell_dialogs",
"//content/common",
]
but does not solve anything, in any of the files.
C:\q\src>gn gen out/q
ERROR Dependency cycle: //content/browser:browser ->
//content/common:common -> //ui/shell_dialogs:shell_dialogs ->
//chrome/browser:browser -> //apps:apps ->
//components/keyed_service/content:content ->
//content/public/browser:browser ->
//content/public/browser:browser_sources ->
//content/browser:browser
Related
I recently bumped into a new problem with reticulate and doparallel that I never seen before.
The following code works well with %do% (which is regular for loop) BUT NOT with %dopar% (doParallel package)
library(doParallel)
library(reticulate)
cl <- makeCluster(4)
registerDoParallel(cl)
foreach(j=1:4,.combine=rbind,.packages = "reticulate") %dopar%
{
test <- "Testing to see if dopar can recognize reticulate"
py_run_string("for i in range(len(r.test)): print(i)")
}
Here is the error message:
"Error in { :
task 1 failed - "RuntimeError: Evaluation error: object 'test' not found."
By default, test is an R object and when using reticulate, r.test will be recognized as an object in python py_run_string. However, the dopar created different cluster and therefore the r.test is not recognized anymore. The strange thing in here is that I have test ran inside the foreach loop and reticulate loaded for each small cluster.
Any hint would help. Thanks in advance.
I am writing a package for Julia and within the package I would like to be able to print the my package current version number. I can of course do that manually but I was looking for a way to read it directly from the module. the version number is written in the Project.toml file, but I have not been able to find a way to read it from the code. Any ideas?
You could use something like
julia> using Pkg
julia> loadedversion(m::Module) = VersionNumber(Pkg.TOML.parsefile(joinpath(string(first(methods(m.eval)).file), "..", "..", "Project.toml"))["version"])
loadedversion (generic function with 1 method)
julia> loadedversion(Atom)
v"0.12.8"
Some error handling would be prudent, of course, but that will give you the version of a package that's actually loaded (instead of the one specified in the current environment).
Possibly -
using Pkg
Pkg.TOML.parse(read("Project.toml", String))["version"]
-> "0.0.1"
using Pkg
function pkginfo(pkgname::AbstractString, key = "version")
# Check if Package Project
proj = Pkg.TOML.parsefile(Base.current_project())
proj["name"] == pkgname && return proj[key]
# If not in Project, pkgname must be in deps. Look in Manifest.toml
# An error will be thrown if Manifest.toml is missing
man = Pkg.TOML.parsefile(joinpath(Base.current_project() |> dirname, "Manifest.toml"));
for (pkg, info) in man
pkginfo = info |> first # Play with 'man' to see why
pkg == pkgname && return pkginfo[key]
end
end
This will give you the version (as string) of a package (or other data) in the current enviroment. But a package could be in a deeper enviroment in the stack, so...
Could it be that this is an answer?
using Pkg
Pkg.project().version
v"0.1.2"
I'm develping Selenium tests for Oracle ADF application.
I'm using for that:
JDeveloper fmw_12.2.1.3.0_bpmqs installation
Very usefull library SelniumTools
And I faced with problem:
The SelniumTools based on adf-richclient-automation-11.jar which is distributed with JDeveloper (use can find it in *Oracle_Home\oracle_common\modules\oracle.adf.view* folder) and described in docs as Oracle Customized Selenium.
And everything works fine with selenium-java library up to 2.53.1 version.
But when I upgrade selenium-java library to 3.3.1 version my test project fall with exception:
org.openqa.selenium.WebDriverException: java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.**WebDriverWait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;** Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800' System info: host: 'EE-LATITUDE-749', ip: '10.10.207.64', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_172' Driver info: driver.version: unknown
com.redheap.selenium.junit.PageProvider.createPage(PageProvider.java:49)
com.redheap.selenium.junit.PageProvider.goHome(PageProvider.java:36)
ru.russvet.selenium.tests.P6_ProcessPageTest.(P6_ProcessPageTest.java:38)
java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Caused by: java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;
oracle.adf.view.rich.automation.selenium.RichWebDrivers.waitForServer(RichWebDrivers.java:112)
oracle.adf.view.rich.automation.selenium.RichWebDrivers.waitForRichPageToLoad(RichWebDrivers.java:175)
oracle.adf.view.rich.automation.selenium.RichWebDrivers.waitForRichPageToLoad(RichWebDrivers.java:158)
com.redheap.selenium.page.Page.(Page.java:53)
com.redheap.selenium.page.Page.(Page.java:45)
ru.russvet.selenium.pages.BPMWorkspaceLoginPage.(BPMWorkspaceLoginPage.java:19)
com.redheap.selenium.junit.PageProvider.createPage(PageProvider.java:47)
Investigations follow to the reason:
1) in selenium-java library starting from 3.3.1 interface for until function has been changed and accept Function, Predicate или Supplier classes from Java 8 library instead of Guava library https://github.com/SeleniumHQ/selenium/commit/b2aa9fd534f7afbcba319231bb4bce85f825ef09 :
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.function.Supplier;
2) what could be probably worked around with recent guava release (21+ version), where the Google versions of both Function and Predicate extend the Java 8 equivalents
So, it is look like that adf-richclient-automation-11.jar is built with selenium-java library 2.x, and that causes the exception during running the tests.
We raised it via Oracle support, but there is no information from them about new version for this library yet.
So, my questions are:
1) what is possible way to rebuild the adf-richclient-automation-11.jar to make it compatible with the latest version of selenium-java as 3.x?
2) Has anybody found newer version of adf-richclient-automation-11.jar in maybe some specific distribution of JDeveloper?
I was once upon a time part of the small team within Oracle that built the automation library you are referring to.
The issue here is API compatibility and unless the ADF automation library is repackaged against WebDriver 3.x and redistributed by Oracle OTN, you have no options but to stick to using Selenium 2.x libraries. WebDriver 3.x is meant for Java 8, which would be one more reason Oracle would want to soon upgrade to 3.x. Have you raised your concerns via OTN forums or Oracle support?
Well, answer myself. The only way for now to make this works were decompiling adf-richclient-automation-11.jar, clean and repackage it against WebDriver 3.x.
The corresponding Eclipse project is here https://github.com/EgorBEremeev/adf-richclient-automation-selenium-3-rebuild
This project does not contains test classes as original lib. I didn't run any tests from the original lib because I have no idea of required test environment for that.
So, I tested the repackaged library directly in my main project.
How ever the complete steps to get sources, clean it, fix errors and repackage library you can find in readme.md in the git repository and as well below:
Full Steps to manualy rebuilt adf-richclient-automation-11.jar:
Environment
Install Eclipse
Install Decompiler pluging
Help -> Marketplace -> Enhanced Class Decompiler
Windows -> Preferences -> Java -> Decompiler -> Default Class Decompiler: CFR -> Applay and Close
Set User Libraries
Windows -> Preferences -> Java -> Build Path -> User Libraries
New->
Name -> selenium-java-3.3.1
Add External JARs... ->
path\to\selenium-java-3.3.1\
client-combined-3.3.1-nodeps.jar
lib\*.jar
->Finish
New->
Name -> adf-richclient-automation-11.jar
Add External JARs... ->
path\to\Oracle_Home\oracle_common\modules\oracle.adf.view\
adf-richclient-automation-11.jar
->Finish
-> Applay and Close
Steps
Create Java Project
Eclipse -> New -> Java Project
Name -> project_name
JDK -> 1.8
Build Path -> Libraries -> Add Library -> User Library -> Next
User Libraries ...
selenium-java-3.3.1
adf-richclient-automation-11.jar
Decompile adf-richclient-automation-11.jar
Project Explorer -> adf-richclient-automation-11.jar -> Context Menu -> Export Sources
path\to\project_name\src\
adf-richclient-automation-11-src.zip
Project Explorer -> Refresh
src -> adf-richclient-automation-11-src.zip
Extract decompiled sources into path\to\project_name\src\
Check the src
Project Explorer -> Refresh
src -> adf-richclient-automation-11-src.zip
* oracle.adf.view.rich.automation.selenium
* oracle.adf.view.rich.automation.test
oracle.adf.view.rich.automation.test.browserfactory
* oracle.adf.view.rich.automation.test.component
* oracle.adf.view.rich.automation.test.selenium
org.openqa.selenium
org.openqa.selenium.firefox
5.1 Delete classes used for and with Selenium RC:
path/to/project_name/src/
oracle/adf/view/rich/automation/selenium/RichSelenium.java -> Delete
5.2 Delete packages oracle.adf.view.rich.automation.test.* -> Delete
oracle.adf.view.rich.automation.test
oracle.adf.view.rich.automation.test.browserfactory
oracle.adf.view.rich.automation.test.component
oracle.adf.view.rich.automation.test.selenium
Fix errors:
path/to/project_name/src/oracle/adf/view/rich/automation/selenium/RichWebDrivers.java
[] 241 Type mismatch: cannot convert from element type Object to String ->
fix 239 -> List<String> logs = (List) jsExecutor.executeScript(_GET_AND_CLEAR_LOG_MESSAGES_JS,
=
List<String> logs = (List) jsExecutor.executeScript(_GET_AND_CLEAR_LOG_MESSAGES_JS,
new Object[]{logLevel.toString().toUpperCase()});
for (String s : logs) {
sbf.append(s).append(_NEW_LINE);
}
[] 321 Type mismatch: cannot convert from element type Object to String ->
fix 320 -> Set<String> handles = webDriver.getWindowHandles();
=
public String apply(WebDriver webDriver) {
Set<String> handles = webDriver.getWindowHandles();
for (String handle : handles) {
if (openWindowHandles.contains(handle))
continue;
return handle;
}
return null;
}
Build and Export into jar
remove -> path\to\project_name\src\adf-richclient-automation-11-src.zip
Project Explorer -> Export -> Java -> JAR file -> Next
select src folder only
check Export generated classes and resources
uncheck .classpath, .project
-> Finish -> Ok in warning dialog
Optional fix error in classes from oracle.adf.view.rich.automation.test.* packages.
path/to/project_name/src/oracle/adf/view/rich/automation/test/selenium/WebDriverManager.java
[] 87 Type mismatch: cannot convert from element type Object to String ->
fix 85 Set<String> windowHandles = webDriver.getWindowHandles();
=
try {
Set<String> windowHandles = webDriver.getWindowHandles();
_LOG.fine("try to close all windows... ");
for (String handle : windowHandles) {
path/to/project_name/src/oracle/adf/view/rich/automation/test/selenium/RichWebDriverTest.java
[] 953 Syntax error on token "finally", delete this token ->
fix -> delete 956,952,949, 941
=
protected void refresh() {
_LOG.fine("Executing refresh()");
this.getWebDriver().navigate().refresh();
try {
Alert alert = this.getWebDriver().switchTo().alert();
if (alert != null) {
alert.accept();
};
}
catch (WebDriverException alert) {}
finally {
this.waitForPage();
}
}
[] 1026 Unreachable catch block for Exception. It is already handled by the catch block for Throwable ->
fix -> replace whole method by variant of Jad Decompiler->
-> Windows -> Preferences -> Java -> Decompiler -> Default Class Decompiler: Jad -> Applay and Close
-> fix 1020, 1028 Duplicate local variable cachingEnabled ->
fix-> delete
-> 1019 String msg;
-> 1018 boolean cachingEnabled;
=
protected void onShutdownBrowser() {
_LOG.finest("Shutting down browser");
try {
_logSeleniumBrowserLogAndResetLoggerLevel();
} catch (Exception e) {
boolean cachingEnabled;
String msg;
_LOG.warning("The page did not generate any logs.");
} finally {
boolean cachingEnabled = isBrowserCachingEnabled();
try {
if (cachingEnabled) {
getWebDriverManager().releaseInstance();
} else {
getWebDriverManager().destroyInstance();
}
} catch (Throwable t) {
String msg = cachingEnabled
? "Failed to release the browser. Error message: %s"
: "Failed to shutdown the browser. Error message: %s";
_LOG.severe(String.format(msg, new Object[]{t.getMessage()}));
}
}
}
[] 1047 Type mismatch: cannot convert from element type Object to WebElement ->
fix 1046 List<WebElement> allOptions = element.findElements(By.xpath((String) builder.toString()));
=
List<WebElement> allOptions = element.findElements(By.xpath((String) builder.toString()));
for (WebElement option : allOptions) {
path/to/project_name/src/oracle/adf/view/rich/automation/test/UrlFactories.java
[] 34 Type mismatch: cannot convert from UrlFactory to UrlFactories.UrlFactoryImpl ->
fix Add cast to 'UrlFactoryImpl'
=
factory = (UrlFactoryImpl) urlFactoryIterator.next();
[] 52 Type mismatch: cannot convert from UrlFactory to UrlFactories.UrlFactoryImpl
fix Add cast to 'UrlFactoryImpl'
=
UrlFactoryImpl urlFactoryImpl = (UrlFactoryImpl) (_INSTANCE = factory != null ? factory : new UrlFactoryImpl());
When using the AngularJS to create mozilla browser extension, when requesting for the service call using $http that time when response come an error encountered.
This is what I was getting when I am requesting using $http :
Error: 'setTimeout' called on an object that does not implement
interface Window.
Browser/self.defer#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:6241:17
$RootScopeProvider/this.$get</Scope.prototype.$evalAsync#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:17719:11
$QProvider/this.$get</<#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:16291:7
scheduleProcessQueue#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:16399:5
qFactory/<.$$resolve#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:16432:11
qFactory/<.resolve#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:16415:9
simpleBind/<#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:16368:7
resolvePromise#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:11843:10
resolveHttpPromise#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:11824:11
done#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:11830:11
completeRequest#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:12033:7
requestLoaded#resource://gre/modules/ExtensionContent.jsm -> moz-extension://cb6087c3-cd93-43d0-b239-0681ece93f36/dotAlign_Project/app/lib/angular/angular.js:11966:9
I got the reason of the problem,
Due to use 'window' object in the 'Angular Library' this error was coming.
So to solve the issue I replaced 'window' object with '$window'.
I'm trying to build a simple process,
I've created the process, a form for the the pool and the human task:
"clicked on the pool -> application -> PageFlow -> Add" and
"clicked on the human Task -> application -> PageFlow -> Add"
But I'm facing this error:
Internal form mapping is undefined for Étape1.
org.bonitasoft.studio.designer.core.bar.FormMappingBarResourceProvider.isValid(FormMappingBarResourceProvider.java:147)
org.bonitasoft.studio.designer.core.bar.FormMappingBarResourceProvider.addFormMapping(FormMappingBarResourceProvider.java:83)
org.bonitasoft.studio.designer.core.bar.FormMappingBarResourceProvider.newFormMappingModel(FormMappingBarResourceProvider.java:76)
org.bonitasoft.studio.designer.core.bar.FormMappingBarResourceProvider.addResourcesForConfiguration(FormMappingBarResourceProvider.java:68)
org.bonitasoft.studio.engine.export.BarExporter.createBusinessArchive(BarExporter.java:117)
org.bonitasoft.studio.engine.export.BarExporter.createBusinessArchive(BarExporter.java:91)
org.bonitasoft.studio.engine.export.BarExporter.createBusinessArchive(BarExporter.java:165)
org.bonitasoft.studio.engine.operation.ExportBarOperation.exportBar(ExportBarOperation.java:118)
org.bonitasoft.studio.engine.operation.ExportBarOperation.run(ExportBarOperation.java:106)
org.bonitasoft.studio.engine.ui.wizard.ExportBarWizardPage$7.run(ExportBarWizardPage.java:405)
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)