Why NBug HostApplicationVersion shows an incorrect version of the application? - nbug

I get a Crash Report, but HostApplicationVersion does not show the version of my application.
It seems that the version of NBug itself is shown, while the version of my application 2.12.4.0.
<Report xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GeneralInfo>
<CLRVersion>4.0.30319.42000</CLRVersion>
<DateTime>10/14/2020 6:17:46 PM</DateTime>
<ExceptionMessage>Object reference not set to an instance of an object.</ExceptionMessage>
<ExceptionType>System.NullReferenceException</ExceptionType>
<HostApplication>HotBotVPN.exe</HostApplication>
<HostApplicationVersion>1.2.*</HostApplicationVersion>
<NBugVersion>1.2.1.0</NBugVersion>
<TargetSite>...</TargetSite>
</GeneralInfo>
</Report>

You probably need to set this: https://github.com/soygul/NBug/blob/master/NBug/Settings.cs#L391
I'm guessing you are dynamically loading NBug assembly which can cause this.

Related

Xamarin.Forms : Error CS1704 An assembly with the same simple name 'ReactiveUI' has already been imported. Try removing one of the references

Error CS1704 An assembly with the same simple name 'ReactiveUI' has already been imported. Try removing one of the references (e.g.
'C:\Users\LOGESH
PALANI.nuget\packages\reactiveui-core\7.0.0\lib\MonoAndroid403\ReactiveUI.dll')
or sign them to enable side-by-side. GetMobileNumber.Android
C:\Users\LOGESH
PALANI\source\repos\GetMobileNumber\GetMobileNumber\GetMobileNumber.Android\CSC"
So it looks like I can't read today!
The project had a reference to the Interop and a COM reference that generated the "same" interop. So there were two and I just didn't search very well. I still don't understand why it worked in other places but this did fix it.

How to see assertions, that have passed successfully in result tree

A the moment when I execute some tests, I can see only the failed assertions in the result tree listener.
Since I would like to do functional testing with this tools, I need to have all passed validations included in the report.
Is it possible in the new version of Jmeter?
You can "tell" JMeter to store results as XML - it will trigger saving assertion results in .jtl file
To switch JMeter results file to XML and store all assertion results add the next two lines to user.properties file:
jmeter.save.saveservice.output_format=xml
jmeter.save.saveservice.assertion_results=all
You'll get output like:
<?xml version="1.0" encoding="UTF-8"?>
<testResults version="1.2">
<httpSample t="340" lt="340" ts="1430219540110" s="true" lb="HTTP Request" rc="200" rm="OK" tn="Thread Group 1-1" dt="text" by="1591" ng="1" na="1">
<assertionResult>
<name>Response Assertion</name>
<failure>false</failure>
<error>false</error>
</assertionResult>
</httpSample>
See Apache JMeter Properties Customization Guide for more information on JMeter properties and ways of controlling them.

Translations of QMessageBox not work in Qt5.3

I'm a fan of Qt and update it frequently, Qt5.1->5.2->5.3.
However, the tranalations of Standard buttons like "Ok" "Cancel" "Save" do not work anymore in Qt5.3.
They are not translated, but just plain English.
The Code for translations does NOT change through each version of Qt.
like:
TRANSLATIONS = qt_fr.ts
QTranslator trans
trans.load("qt_fr");
a.installTranslator(&trans);
any idea?
[Update]
AFAIN, it might be a bug. Go back to Qt5.1 is a slution if U dont have to use some improvements in new Qts.
Starting from Qt5.3 the qt_*.qm is divided into multiple files (qt*_*.qm) and now you have to copy qtbase_*.qm to translation directory and use together.
QString translationsPath(QLibraryInfo::location(QLibraryInfo::TranslationsPath));
QLocale locale = QLocale::system();
QTranslator qtTranslator;
if (qtTranslator.load(locale, "qt", "_", translationsPath))
a.installTranslator(&qtTranslator);
QTranslator qtBaseTranslator;
if (qtBaseTranslator.load(locale, "qtbase", "_", translationsPath))
a.installTranslator(&qtBaseTranslator);
I had the same problem and got it to work with an updated translation file. I am not sure if this is the intended behaviour, but my qt_de.qm has a filesize of only 1kB. There is however a file called qtbase_de.qm now (154kB) which seems to do the trick.
This is source of qt_ru:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="ru">
<dependencies>
<dependency catalog="qtbase_ru"/>
<dependency catalog="qtscript_ru"/>
<dependency catalog="qtquick1_ru"/>
<dependency catalog="qtmultimedia_ru"/>
<dependency catalog="qtxmlpatterns_ru"/>
</dependencies>
</TS>
Therefore, it is necessary to deploy application with all these translation files. If at least one file is missing, the translation qt_ru will not load.

How to Remove Configlet from "Site Setup - Add-on Configuration"

I'm deprecating a Site Setup add-on configlet. The procedure I'm following is add the remove="true" property to controlpanel.xml
<!-- profiles/default/controlpanel.xml -->
<configlet
title="MyConfiglet" ...
remove="true">
<permission>Manage portal</permission>
</configlet>
and then execute an upgradeStep. I tried with
<!-- upgrades/configure.zcml -->
<genericsetup:upgradeSteps ...>
<genericsetup:upgradeDepends
title="Remove Configlet"
import_steps="plone.app.registry controlpanel"
/>
</genericsetup:upgradeSteps>
But after executing the upgrade step, I still can see the configlet in /##overview-controlpanel.
What am I missing? What do I need to remove the configlet from the control panel?
Thanks.
The process of removing something from Plone involves more or less the same steps you used to add it; in this specific case you have two ways of doing it: programmatically or using Generic Setup.
programmatically
I think this is easier as involves no more than a few lines of code and you can debug in case of problems.
just use the following code on your upgrade step:
def remove_configlet(self):
from plone import api
config_tool = api.portal.get_tool('portal_controlpanel')
configlet_id = 'MyConfigletId'
config_tool.unregisterConfiglet(configlet_id)
using Generic Setup
create a controlpanel.xml file inside the profile you're registering for your upgrade step; this file should contain exactly the same stuff used to add the configlet plus the remove="True" attribute.
you can find a working example of this on the upgrade_10_to_11 profile of Products.TinyMCE:
controlpanel.xml
upgrades.py
<?xml version="1.0"?>
<object name="portal_controlpanel" meta_type="Plone Control Panel Tool"
xmlns:i18n="http://xml.zope.org/namespaces/i18n" i18n:domain="plone.tinymce">
<configlet title="TinyMCE"
action_id="tinymce" appId="TinyMCE"
category="Products"
condition_expr=""
url_expr="string:${portal_url}/portal_tinymce/##tinymce-controlpanel"
visible="True"
i18n:attributes="title"
remove="True">
<permission>Manage portal</permission>
</configlet>
...
</object>
def upgrade_10_to_11(setuptool):
"""Upgrade TinyMCE from 1.0 to 1.1"""
...
# Unregister old js and register new js
setuptool.runAllImportStepsFromProfile('profile-Products.TinyMCE:upgrade_10_to_11')
in case of doubts take a look at Luca Fabbri's excelent blog post on How to make your Plone add-on products uninstall cleanly.

SWIZ: Getting started with first example

I am trying to start with the framework, but it appears to be
dramatically hard for some reason. I want to follow complete example
posted here
http://swizframework.jira.com/wiki/display/SWIZ/Quick+Start
But I have issue on the very beginning. E.g.
<swiz:beanProviders>
<config:Beans />
</swiz:beanProviders>
The line causes the error:
The prefix "config" for element "config:Bean" is not bound.
SwizTest.mxml /SwizTest/src line 10 Flex Problem
I think you're probably just missing the namespace declaration for the config: part of config:Beans. Flex basically doesn't know what package or folder config prefix is pointing to unless you have that.
If you look at the application node at the top of the example I think you'll see what's missing:
<s:Application
xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:view="org.swizframework.quickswiz.view.*"
xmlns:config="org.swizframework.quickswiz.config.*"
xmlns:swiz="http://swiz.swizframework.org">
Hope that does the trick.

Resources