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

Logon message is broken in FIX 4.3 #52

Closed
ChrisiPK opened this issue Oct 12, 2022 · 3 comments
Closed

Logon message is broken in FIX 4.3 #52

ChrisiPK opened this issue Oct 12, 2022 · 3 comments

Comments

@ChrisiPK
Copy link
Contributor

The logon message for FIX 4.3 is missing user name and password fields. It is not possible to logon without these fields.

https://github.com/TimelordUK/jspurefix/blob/master/src/types/FIX4.3/repo/logon.ts

I will be happy to create a pull request to fix this. However, I am wondering: Is FIX 4.3 supported by this library? Or will I run into more problems when trying to use it and I should try to use 4.4 in its place?

@TimelordUK
Copy link
Owner

looks like a bug in XML parser for repo i will have to debug it

in interim If you pull latest from master I have added the quickfix 4.3

https://github.com/TimelordUK/jspurefix/blob/master/src/types/FIX4.3/quickfix/logon.ts

is this OK to use? this should work I added the compiled types for quickfix from this XML

import { IStandardHeader } from './set/standard_header'
import { ILogonNoMsgTypes } from './set/logon_no_msg_types'
import { IStandardTrailer } from './set/standard_trailer'

export interface ILogon {
  StandardHeader: IStandardHeader// [1] BeginString.8, BodyLength.9 .. HopRefID.630
  EncryptMethod: number// [2] 98 (Int)
  HeartBtInt: number// [3] 108 (Int)
  RawDataLength?: number// [4] 95 (Length)
  RawData?: Buffer// [5] 96 (RawData)
  ResetSeqNumFlag?: boolean// [6] 141 (Boolean)
  MaxMessageSize?: number// [7] 383 (Length)
  NoMsgTypes?: ILogonNoMsgTypes[]// [8] RefMsgType.372, MsgDirection.385
  TestMessageIndicator?: boolean// [9] 464 (Boolean)
  Username?: string// [10] 553 (String)
  Password?: string// [11] 554 (String)
  StandardTrailer: IStandardTrailer// [12] SignatureLength.93, Signature.89, CheckSum.10
}

@ChrisiPK
Copy link
Contributor Author

ChrisiPK commented Oct 14, 2022

Thanks for the fast response! I pulled from master and changed the dictionary to qf43 and now I can log on. :) I will do some more testing and check if everything else works as well.

However, I also encountered another error:

2022-10-14T18:42:59.669Z [launcher] error: ENOENT: no such file or directory, lstat '/workspaces/jspf-demo/node_modules/jspurefix/data/FIX43.xml' : Error: ENOENT: no such file or directory, lstat '/workspaces/jspf-demo/node_modules/jspurefix/data/FIX43.xml'
at Object.lstatSync (node:fs:1516:3)
at DefinitionFactory.getParser (/workspaces/jspf-demo/node_modules/jspurefix/dist/util/definition-factory.js:36:16)
at DefinitionFactory. (/workspaces/jspf-demo/node_modules/jspurefix/dist/util/definition-factory.js:30:33)
at Generator.next ()
at /workspaces/jspf-demo/node_modules/jspurefix/dist/util/definition-factory.js:8:71
at new Promise ()
at __awaiter (/workspaces/jspf-demo/node_modules/jspurefix/dist/util/definition-factory.js:4:12)
at DefinitionFactory.getDefinitions (/workspaces/jspf-demo/node_modules/jspurefix/dist/util/definition-factory.js:24:16)
at /workspaces/jspf-demo/node_modules/jspurefix/dist/runtime/make-config.js:32:40
at new Promise ()

The problem is that the file extension of data/FIX43.XML is all uppercase, whereas the code is looking for lowercase. I renamed the file locally to FIX43.xml and that has fixed the problem for me. Would be great if you could also change that in the repository.

@TimelordUK
Copy link
Owner

this has been fixed thanks for raising issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants