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

Cannot Rent an office at any station #105

Closed
DeerHunt3r opened this issue Apr 26, 2021 · 4 comments
Closed

Cannot Rent an office at any station #105

DeerHunt3r opened this issue Apr 26, 2021 · 4 comments
Labels
needs-triage This issue needs to be reviewed for accuracy and details

Comments

@DeerHunt3r
Copy link
Contributor

Describe the bug
While trying to rent a Corp. Office at a station nothing happens, Moneys are deducted from your wallet.

See Error from Server Below. Looks like SQL error for Names in the STAOFFICES table. in BOLD below.

To Reproduce
Steps to reproduce the behavior:

  1. From Within a station and as the CEO of a Corp, press the Rent office button
  2. The warning page displays
  3. Click yes
  4. Money is deducted but no office is rented.

Expected behavior
I expect to rent an office.

Screenshots
If applicable, add screenshots to help explain your problem.

System Details (please complete the following information):

  • Server OS: [. Ubuntu 20.04 Server
  • Docker
  • EVEmu Version

Additional context

server_1 | 00:48:39 [Bound] CorpStationMgrIMBound::GetQuoteForRentingAnOffice()
server_1 | 00:48:40 [Bound] CorpStationMgrIMBound::RentOffice()
server_1 | 00:48:40 [AcctTrace] TranserFunds() - from: 98000000, to: 1000169, entry: 13, refID: 0, amount: 10000.00, fKey: 1000, tKey: 1000
server_1 | 00:48:40 [AcctTrace] HandleCorpTransaction() - corp: 98000000, from: 98000000, to: 1000169, entry: 13, refID: 0, amount: -10000.00, key: 1000, currency: 0
server_1 | 00:48:40 [DB Error] DoQuery_locked(/src/src/eve-core/database/dbcore.cpp:320): DBCore - Status != Connected
server_1 | 00:48:40 [DB Msg] DBCore error detected. Look for error msgs in logs prior to this point.
server_1 | 00:48:40 [DB Msg] DBCore attempting to recover...
server_1 | 00:48:40 C DB User: evemu
server_1 | 00:48:40 C DataBase: evemu
server_1 | 00:48:40 C DB Server: db:3306
server_1 | 00:48:40 C Connect Flags: 2
server_1 | 00:48:40 G DataBase Manager: DataBase AutoReconnect Enabled
server_1 | 00:48:40 B DataBase Manager: DataBase Connected
server_1 | 00:48:40 C DataBase Manager: DataBase Character set: utf8
server_1 | 00:48:40 [DB Msg] DBCore recovery successful. Continuing.
server_1 | 00:48:41 [Data Error] Name not found for corp 1000169
server_1 | 00:48:41 [AcctTrace] TranserFunds() - toID: Undefined - WIP(1000169) is neither player nor player corp. Not sending update.
server_1 | 00:48:41 [DB Error] DoQuery_locked(/src/src/eve-core/database/dbcore.cpp:345): DBCore Query - #1364 in 'INSERT INTO staOffices (corporationID, stationID, officeFolderID, flag, solarSystemID, typeID, stationTypeID, lockDown, rentalFee, expiryDateTime) VALUES (98000000,60014719,66014719,71,30005305, 27, 57,0,10000,132664637210000000)': Field 'name' doesn't have a default value
server_1 | 00:48:41 [DB Error] CreateOffice(/src/src/eve-server/station/StationDB.cpp:27): Error in CreateOffice query: Field 'name' doesn't have a default value
server_1 | 00:48:41 [CorpError] Handle_RentOffice(/src/src/eve-server/corporation/CorpStationMgr.cpp:261): Elsa Coldfist: Error at renting a new office

server_1 | 00:48:41 [Bound] CorpStationMgrIMBound::GetNumberOfUnrentedOffices()
server_1 | 00:48:51 [Service] charMgr::GetTopBounties()
server_1 | 00:48:51 [DB Error] DoQuery_locked(/src/src/eve-core/database/dbcore.cpp:320): DBCore - Status != Connected
server_1 | 00:48:51 [DB Msg] DBCore error detected. Look for error msgs in logs prior to this point.
server_1 | 00:48:51 [DB Msg] DBCore attempting to recover...
server_1 | 00:48:51 C DB User: evemu
server_1 | 00:48:51 C DataBase: evemu
server_1 | 00:48:51 C DB Server: db:3306
server_1 | 00:48:51 C Connect Flags: 2
server_1 | 00:48:51 G DataBase Manager: DataBase AutoReconnect Enabled
server_1 | 00:48:51 B DataBase Manager: DataBase Connected
server_1 | 00:48:51 C DataBase Manager: DataBase Character set: utf8
server_1 | 00:48:51 [DB Msg] DBCore recovery successful. Continuing.

@DeerHunt3r DeerHunt3r added the needs-triage This issue needs to be reviewed for accuracy and details label Apr 26, 2021
DeerHunt3r added a commit to DeerHunt3r/evemu_Crucible that referenced this issue Apr 30, 2021
@zhyrohaad
Copy link
Contributor

this needs a default value in db OR a value in the query.

@DeerHunt3r
Copy link
Contributor Author

Ah, like we did with the AllianceMemberStartDate field in crpCorporation.... I'll setup a new pull request and get it submitted.
Thanks!

@ToddRosenkrantz
Copy link
Contributor

The problem is that the "OfficeData& odata" object does not have the corporationName and the function:

uint32 StationDB::CreateOffice(ItemData& idata, OfficeData& odata) does not pass a name field it to dbcore.

I can't determine how to add "crpCorporation.corporationName" to session data (or if it should even be passed that way).

I've created a very ugly & improper 'work around' in StationDB.cpp to test & verify an Office CAN be rented.

uint32 StationDB::CreateOffice(ItemData& idata, OfficeData& odata)
{
uint32 uid = 0;
DBerror err;
if (!sDatabase.RunQueryLID(err, uid,
"INSERT INTO staOffices (corporationID, stationID, officeFolderID, flag, solarSystemID, typeID, stationTypeID, lockDown, rentalFee, expiryDateTime, name)"
" VALUES"
" (%u,%u,%u,%u,%u, 27, %u,%u,%u,%li,(SELECT crpCorporation.corporationName FROM crpCorporation WHERE corporationID = %u))",
odata.corporationID, odata.stationID, odata.folderID, idata.flag, stDataMgr.GetStationSystemID(odata.stationID), odata.typeID, odata.lockDown, odata.rentalFee, odata.expiryTime, odata.corporationID)
)
codelog(DATABASE__ERROR, "Error in CreateOffice query: %s", err.c_str());

return (odata.officeID = uid);

}

After rebuilding the container, Renting an office opens the Corporate Hanger window with full access.

jdhirst added a commit that referenced this issue Sep 11, 2021
@jdhirst
Copy link
Contributor

jdhirst commented Sep 11, 2021

This has been fixed in 79811ab and will be released into master as part of 0.8.4. Closing this issue.

@jdhirst jdhirst closed this as completed Sep 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This issue needs to be reviewed for accuracy and details
Projects
None yet
Development

No branches or pull requests

4 participants